-
Notifications
You must be signed in to change notification settings - Fork 552
[native] Better p/invoke handling when loading foreign libraries #10165
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
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 | ||||
---|---|---|---|---|---|---|
|
@@ -743,6 +743,16 @@ namespace xamarin::android { | |||||
return starts_with (s.data (), s.length ()); | ||||||
} | ||||||
|
||||||
[[gnu::always_inline]] | ||||||
auto ends_with (std::string_view const& s) noexcept -> bool | ||||||
{ | ||||||
if (empty () || s.length () > buffer.size ()) { | ||||||
return false; | ||||||
} | ||||||
|
||||||
return memcmp (buffer.get () + (length () - s.length ()), s.data (), s.length ()) == 0; | ||||||
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. Just for me to understand, android/src/native/common/include/runtime-base/strings.hh Lines 452 to 453 in 2ef0038
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. Yeah, it's fully inlined each time it's called (which can also the be further optimized by common sub-expression elimination and other techniques, depending on context) |
||||||
} | ||||||
|
||||||
[[gnu::always_inline]] | ||||||
void set_length_after_direct_write (size_t new_length) noexcept | ||||||
{ | ||||||
|
Uh oh!
There was an error while loading. Please reload this page.