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
VSB_tofile() not public in libvarnishapi.so #3238
Comments
As far as I know, it is not intentional. |
bugwash:
|
I didn't find anything missing, but I think I found a spurious entry:
|
Agree that |
@slimhazard I'm surprised though that you can't use it in a VMOD. It's available via libvarnish, so if you link against varnishd and varnishd uses |
@Dridi sure, if it's a VMOD, and once you get Varnish to load the VMOD. So I may have been wrong about VMODs, but I had tried it with a client app. I'm not sure if a VMOD build can get past the ld step if it depends on a symbol in libvarnish.so. Unless you put libvarnish.so into the linker path, and then you're into source-dependent builds. At any rate, I think making This is an area where I think there's a need for clarity. It confuses me when I see something in the Varnish |
I definitely agree that public includes could better be curated, and it has been incrementally improved release after release. |
Reopening because I have a question before |
Just to comment that although I opened the ticket, it's probably @bsdphk who can answer the question. If I had to guess, I'd say it's following the style of a lib call like |
@Dridi I do not know the answer to why but I think the different signature makes sense: The other VSB function do something to the VSB, this one does something with the VSB. The exception to this rule are |
You both got a point. As a general rule (with many exceptions!) in C-land one should start out with the function arguments which change state. On the other hand, in OO-ish-C, the first argument should consistently be the 'self/this' argument. Given how VSB tries hard to isolate the internals, we should probably lean the OO direction and make vsb the first argument. |
Nobody really argued one way or the other. I asked, and Zejerman formulated hypotheses. If we need to make a decision, it needs to happen "fast", and fwiw I would lean towards the OO direction. |
+-0 for either way, flip a coin or go with OO, since some of us are leaning that way. #bikeshed |
Closes varnishcache#3238 Conflicts: lib/libvarnishapi/libvarnishapi.map
Automated with Coccinelle, so the semantic patch could be reused in the vtest project. Closes varnishcache#3238 Conflicts: lib/libvcc/vcc_compile.c bin/varnishd/proxy/cache_proxy_proto.c
Closes #3238 Conflicts: lib/libvarnishapi/libvarnishapi.map
Automated with Coccinelle, so the semantic patch could be reused in the vtest project. Closes #3238 Conflicts: lib/libvcc/vcc_compile.c bin/varnishd/proxy/cache_proxy_proto.c
Closes varnishcache#3238 Conflicts: lib/libvarnishapi/libvarnishapi.map
Automated with Coccinelle, so the semantic patch could be reused in the vtest project. Closes varnishcache#3238 Conflicts: lib/libvcc/vcc_compile.c bin/varnishd/proxy/cache_proxy_proto.c
VSB_tofile()
has been around since cf14a0f, but:The lowercase
t
meaning not global, so it can't be used from a VMOD or utility that just links to libvarnishapi.Is that intentional? I suspect that adding it to libvarnishapi.map may have been forgotten.
The text was updated successfully, but these errors were encountered: