-
Notifications
You must be signed in to change notification settings - Fork 168
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
Rework KeyPathArray filters for notifications in the C-API. #7087
Changes from all commits
ca8e1c5
a0a4d37
c0b6c00
d36ee75
4ab3166
6cca07f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -361,6 +361,14 @@ constexpr inline size_t round_down(size_t p, size_t align) | |
return r & (~(align - 1)); | ||
} | ||
|
||
// return pointer to found character or to terminating NUL | ||
static inline const char* find_chr(const char* p, char c) | ||
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. Why do we need this utility? It seems to me that it is just a 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. strchr will return nullptr if not found. We need it to return a pointer to terminating NUL character. GCC has a function called strchrnul, but that is not generally available. 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. OK, I think it does not make a huge difference if we call |
||
{ | ||
while (*p && *p != c) { | ||
++p; | ||
} | ||
return p; | ||
} | ||
|
||
#ifdef _WIN32 | ||
typedef HANDLE FileDesc; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't there be value in having this method available to SDKs that do not use the C-API? I guess it is already available since it is just a static helper method, but maybe the location is a bit wierd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A static function is actually private within the compilation unit. We might consider making it public somewhere. At least to the binding generator.