Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gquintard
Copy link
Member

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.

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
Copy link
Member Author

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?

Comment on lines +186 to +187
void *
VRT_VSC_AllocVariadic(struct vsmw_cluster *vc, struct vsc_seg **sg,
Copy link
Member

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 :-/

Copy link
Member

@nigoroll nigoroll left a 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

@bsdphk
Copy link
Contributor

bsdphk commented Apr 9, 2025

I agree with @dridi that the name is non-C-ish, but I'll refrain from making suggestions, what with bikesheds and whats not.

@gquintard gquintard force-pushed the VRT_VSC_AllocVariadic branch 2 times, most recently from 204a945 to 2976944 Compare April 9, 2025 14:57
@gquintard
Copy link
Member Author

so, VRT_VSC_Allocv->VRT_VSC_Alloc and VRT_VSC_AllocVariadic->VRT_VSC_Allocv?

@nigoroll
Copy link
Member

nigoroll commented Apr 9, 2025

so, VRT_VSC_Allocv->VRT_VSC_Alloc and VRT_VSC_AllocVariadic->VRT_VSC_Allocv?

No.

VRT_VSC_Alloc->VRT_VSC_Allocv, VRT_VSC_AllocVariadic->VRT_VSC_Alloc?

@dridi
Copy link
Member

dridi commented Apr 9, 2025

so, VRT_VSC_Allocv->VRT_VSC_Alloc and VRT_VSC_AllocVariadic->VRT_VSC_Allocv?

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() renamed to VRT_VSC_Allocv()
  • new VRT_VSC_Alloc() added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants