-
Notifications
You must be signed in to change notification settings - Fork 387
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
introduce VRT_VSC_AllocVariadic #4303
base: master
Are you sure you want to change the base?
Conversation
VRT_VSC_Alloc requires `va_list` which isn't available on all platforms in `rust`. To bridge this FFI gap, provide a variadic version of it.
@@ -824,6 +824,10 @@ void VRT_VSM_Cluster_Destroy(VRT_CTX, struct vsmw_cluster **); | |||
#ifdef va_start // XXX: hackish |
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.
side note: I'm not sure this ifdef
is justified anymore? There's no alternative for VRT_VSC_Alloc
if it isn't defined, and we systematically rely on that function, don't we?
void * | ||
VRT_VSC_AllocVariadic(struct vsmw_cluster *vc, struct vsc_seg **sg, |
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.
I would have suggested VRT_VSC_Allocv()
to match what we do in other places but in this case it's completely backwards :-/
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.
WFM, but yes, VRT_VSC_Allocv()
edit: Right, we should name the va_list
version ...v
. I have no problem with a breaking change for a simple rename
I agree with @dridi that the name is non-C-ish, but I'll refrain from making suggestions, what with bikesheds and whats not. |
204a945
to
2976944
Compare
so, |
No.
|
That's a sneaky breaking change, but that would be the correct move. You'd need two extra entries in the VRT history:
|
VRT_VSC_Alloc requires
va_list
which isn't available on all platforms inrust
. To bridge this FFI gap, provide a variadic version of it.