Re: [PHP] How to get a string from C library into PHP via SWIG?

2010-01-05 Thread Eric Fowler
:38 PM, Eric Fowler wrote: >> >> A little more information: my crashes all relate to handling the char >> datatype. Floats and ints are happy. >> >> I suspect that a char type in PHP is not the same as a char type in C. >> But I am not sure at all. >> >&

Re: [PHP] How to get a string from C library into PHP via SWIG?

2010-01-05 Thread Eric Fowler
happy, the chars crash upon allocation. Weird. Eric On Tue, Jan 5, 2010 at 2:56 PM, Nathan Nobbe wrote: > On Tue, Jan 5, 2010 at 3:42 PM, Eric Fowler wrote: >> >> Hm, that could work, but it does produce overhead. > > you should consider your overall communication parad

Re: [PHP] How to get a string from C library into PHP via SWIG?

2010-01-05 Thread Eric Fowler
STDIN / STDOUT, if so i think going over the shell is a no-brainer.. On Tue, Jan 5, 2010 at 2:56 PM, Nathan Nobbe wrote: > On Tue, Jan 5, 2010 at 3:42 PM, Eric Fowler wrote: >> >> Hm, that could work, but it does produce overhead. > > you should consider your overall communication

Re: [PHP] How to get a string from C library into PHP via SWIG?

2010-01-05 Thread Eric Fowler
Hm, that could work, but it does produce overhead. Thank you. Eric On Tue, Jan 5, 2010 at 1:29 PM, Ashley Sheridan wrote: > > On Tue, 2010-01-05 at 13:29 -0800, Eric Fowler wrote: > > I have a need to call a C language function from a PHP script. > > The function, which I

[PHP] How to get a string from C library into PHP via SWIG?

2010-01-05 Thread Eric Fowler
I have a need to call a C language function from a PHP script. The function, which I wrote, looks like this: /* * foo(): Takes a string in sIn and writes another string into sOut according to what is passed in, and the * value at *pcch. Will not write more than *pcch bytes to output, including nu