Closed zeekoe closed 5 years ago
The original author wrote it like that to automatically append the MARKER_A and MARKER_B special codes to help detect vararg-related errors. There's no easy way to fix it without breaking existing user code unfortunately so I've opted to leave it. (I might remove it if I ever release a "breaking" major version.) You could wrap lo_send_internal
instead but in fact due to the use of varargs I recommend bindings to use lo_message_add et al, and lo_message_send instead of lo_send_internal.
Thanks for your clear answer. I understand the difficulties. Using the lo_message_add* might indeed be a good option for me when I want to implement more functionality (e.g. receiving messages) from liblo, or I'll just keep the small wrapper if I'm lazy. :)
I tried accessing liblo from Java using JNA (Java Native Access), but after a lot of wrestling with liblo I wrote my own wrapper lib. It turned out that the problem was, that lo_send is a macro and not a real function (https://stackoverflow.com/questions/54845785/linux-jna-unsatisfiedlinkerror-on-liblo-second-method-call/54877483#54877483). I'm not very much into C; is there a good reason not to convert it to a 'real' function to have other languages access liblo more easily?