[PHP] unpacking an array of structs...

2010-02-22 Thread php.l...@juun.com
I have a desktop app that has a data structure that looks like this: typedef struct MANGOpie { unsigned char mango; unsigned short pie; } MANGOpie; I manage a C array of these things in memory: MANGOpie * pies = (MANGOpie *)malloc(count*sizeof(MANGOpie)); I pass these to a PHP s

Re: [PHP] unpacking an array of structs...

2010-02-22 Thread php.l...@juun.com
te: have you considered using json as transport? http://json.org/ has code you can re-use. On Tue, Feb 23, 2010 at 7:29 AM, php.l...@juun.com wrote: I have a desktop app that has a data structure that looks like this: typedef struct MANGOpie {   unsigned char   mango;   unsigned short  pie;

Re: [PHP] unpacking an array of structs...

2010-02-22 Thread php.l...@juun.com
as binary data using PUT. On February 23, 2010, Nathan Nobbe wrote: On Monday, February 22, 2010, php.l...@juun.com wrote: I have a desktop app that has a data structure that looks like this: typedef struct MANGOpie {   unsigned char   mango;   unsigned short  pie; } MANGOpie; I mana