I'm working on a PECL extension and I need to convert a long:
long index;

into a char* that I can pass to another function. I obviously want to avoid
buffer overflows and memory leaks and I'd also like to avoid introducing
any code that is machine-dependent on the sizeo or endianness of a long.

Is there some canonical/recommended way to accomplish this?

Reply via email to