Hi Thomas,
thanks a lot for your char * vs char** explanation!
>
> But if there is no sure way to guess the correct buffer size before
> the function call, your only failsafe option is to invoke the function
> repeatedly with increasing buffer sizes as long as it reports
> failure.
I see... but
2011/6/12 keyd...@gmx.de :
> [...]
> In fact to be honest, I do not really understand the reason why I
> have to allocate a byte buffer here - what difference does it make
> to a char **, shouldn't both just be consecutive places in memory
> filled with ascii characters
> [...]
Hello Sigrid,
a by
Hi Thomas,
thank you, too, very much for your solution! I had already successfully tried
Ryan's way, but it's always good and instructive to learn several ways - now I
know 2 ways to allocate a byte buffer and to cast it to a string afterwards :-)
I've tried your solution, and it worked perfect
2011/6/11 keyd...@gmx.de :
> [...]
> I have a problem getting an output string from the C side...
Hello Sigrid,
it would be helpful if you mentioned the signature of the original C
function, otherwise it is hard to decide whether your binding's
signature is correct.
I will assume that the functi
Hi Ryan,
thank you very much, this works very well!
I am not sure yet whether it'd be desirable to pass in the buffer to the
function,- it's more work for the client, but in any case, the client will have
to specify the buffer length.
Regarding garbage collection, it should not really make a dif
On 06/11/2011 12:54 AM, keyd...@gmx.de wrote:
Hi again,
sorry for again asking such a basic FFI question, but I have a problem getting
an output string from the C side...
E.g. in one case, in my first attempt
(def-ocilib datetotext OCI_DateToText : (date_ptr : _pointer) (fmt : _string) (size
Hi again,
sorry for again asking such a basic FFI question, but I have a problem getting
an output string from the C side...
E.g. in one case, in my first attempt
(def-ocilib datetotext OCI_DateToText : (date_ptr : _pointer) (fmt : _string)
(size : _int) (strval : (_ptr o _string)) -> (result
7 matches
Mail list logo