-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Implement collation native functions functions #86895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
164bb0a
1e4e9a5
292b915
9d23f7b
1f8b5d5
7b91b6c
c4a2d3c
001c366
0ec8d79
fa7322c
fc2837b
a7ab572
36de1a9
139a6ba
f3da1e5
5c3f172
ab317f7
24094fe
c425d38
a3f44b4
cbaaf80
caebcbe
71b026e
9dda83a
88c6861
460aba0
3d5a195
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,26 @@ | |
|
||
internal static partial class Interop | ||
{ | ||
internal struct Range | ||
{ | ||
public int Location; | ||
public int Length; | ||
} | ||
|
||
internal static partial class Globalization | ||
{ | ||
[LibraryImport(Libraries.GlobalizationNative, EntryPoint = "GlobalizationNative_CompareStringNative", StringMarshalling = StringMarshalling.Utf16)] | ||
internal static unsafe partial int CompareStringNative(string localeName, int lNameLen, char* lpStr1, int cwStr1Len, char* lpStr2, int cwStr2Len, CompareOptions options); | ||
|
||
[LibraryImport(Libraries.GlobalizationNative, EntryPoint = "GlobalizationNative_EndsWithNative", StringMarshalling = StringMarshalling.Utf16)] | ||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Out of curiosity, why are we adding There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did like is done for But not sure why only these 2 functions have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My guess is that it is to avoid regressing the hot path of the method by inlining the PInvoke. |
||
internal static unsafe partial int EndsWithNative(string localeName, int lNameLen, char* target, int cwTargetLength, char* source, int cwSourceLength, CompareOptions options); | ||
|
||
[LibraryImport(Libraries.GlobalizationNative, EntryPoint = "GlobalizationNative_IndexOfNative", StringMarshalling = StringMarshalling.Utf16)] | ||
internal static unsafe partial Range IndexOfNative(string localeName, int lNameLen, char* target, int cwTargetLength, char* pSource, int cwSourceLength, CompareOptions options, [MarshalAs(UnmanagedType.Bool)] bool fromBeginning); | ||
|
||
[LibraryImport(Libraries.GlobalizationNative, EntryPoint = "GlobalizationNative_StartsWithNative", StringMarshalling = StringMarshalling.Utf16)] | ||
[MethodImpl(MethodImplOptions.NoInlining)] | ||
internal static unsafe partial int StartsWithNative(string localeName, int lNameLen, char* target, int cwTargetLength, char* source, int cwSourceLength, CompareOptions options); | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.