-
Notifications
You must be signed in to change notification settings - Fork 51
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
API: add const to message payload accessor functions #1212
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1212 +/- ##
==========================================
- Coverage 78.26% 78.22% -0.05%
==========================================
Files 158 158
Lines 29139 29139
==========================================
- Hits 22806 22794 -12
- Misses 6333 6345 +12
|
a quick skim, it looks good to me. Did notice this typo in the commit message.
|
Ooops! I'll fix. |
309efd5
to
9f47de9
Compare
Forced a push with the commit message typo fix. |
once it passes will hit the button |
Actually one more typo, is "writeall" supposed to be "write_all"? |
Argh! fixing... |
9f47de9
to
32e96cb
Compare
Problem: flux_msg_get_payload() accepts a void ** argument that is set to point to the message payload, but the payload belongs to the const flux_msg_t * passed in as another argument. Make the payload pointer 'const'. The following functions, based on the above, are similarly updated: flux_request_decode_raw() flux_response_decode_raw() flux_rpc_get_raw() flux_mrpc_get_raw() flux_content_load_get() Finally, all users of the above functions are updated. And a libutil function write_all() parameter was changed to const as well, since flux-content was using it on payload returned from flux_content_load_get(), and anyway it was appropriate there. Fixes flux-framework#1211
Update for flux_content_load_get() prototype change.
Update for flux_rpc_get_raw() prototype change.
Update for flux_response_decode_raw() prototype change.
Update for flux_request_decode_raw() prototype change
Update for flux_mrpc_get_raw() prototype change.
Thanks! |
In flux_future_get, convert void * parameter to void ** parameter, consistent to fixes done in flux-framework#1144 and flux-framework#1212. Fixes flux-framework#1602
In flux_future_get, convert void * parameter to void ** parameter, consistent to fixes done in flux-framework#1144 and flux-framework#1212. Fixes flux-framework#1602
As noted in #1211,
flux_msg_get_payload()
and all the functions based on it should use const on thevoid **data
paramter, since the payload belongs to the message (also const).New prototypes:
All the internal code that touches these functions was also updated.
Man pages were updated.