Fix a few signature that were using long types. NFC#18998
Merged
Conversation
kripken
reviewed
Mar 20, 2023
|
|
||
| // Returns the WebSocket.bufferedAmount field into bufferedAmount. bufferedAmount must not be a null pointer. | ||
| EMSCRIPTEN_RESULT emscripten_websocket_get_buffered_amount(EMSCRIPTEN_WEBSOCKET_T socket, unsigned long long *bufferedAmount __attribute__((nonnull))); | ||
| EMSCRIPTEN_RESULT emscripten_websocket_get_buffered_amount(EMSCRIPTEN_WEBSOCKET_T socket, size_t *bufferedAmount __attribute__((nonnull))); |
Member
There was a problem hiding this comment.
This changes the type from i64 to either i32 or i64 depending on wasm32/64? In that case don't we need to update the place that writes to it in src/*.js which atm has i64?
The emscripten_request_animation_frame sig was just wrong since that Web API returns WebIDL `long` defined as i32. For emscripten_webgl_get_parameter_i64v use GLint64 rather than `long long` to me more explicit. For `emscripten_websocket_get_buffered_amount` using `size_t` since we already include `stdint.h` in this header anyway. I found all of these while working on #18985 which detectes the use of `long`, `size_t` or pointers and marks tham a `p` in their `__sig` attribute.
8cc151f to
9dbba05
Compare
kripken
approved these changes
Mar 20, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
emscripten_request_animation_framesig was just wrong since that Web API returns WebIDLlongdefined as i32.For
emscripten_webgl_get_parameter_i64vuse GLint64 rather thanlong longto me more explicit.For
emscripten_websocket_get_buffered_amountusingsize_tsince we already includestdint.hin this header anyway.I found all of these while working on #18985 which detectes the use of
long,size_tor pointers and marks tham apin their__sigattribute.