in reply to Re: A clean way to account for machine word sizes in XS code?
in thread A clean way to account for machine word sizes in XS code?
char is 8 bits on every platform perl runs on.
You could use the new C99 types, as that already has known-length types so you can declare a variable as, eg, a 16-bit int instead of just hoping that short is 16 bits.
Unfortunately on some platforms (and possibly on some compilers on other platforms) you'll need to do some Magic to invoke the compiler in C99-mode. I suggest not bothering, until someone sends you a failure report. Then you ask them for a patch for their weird platform :-)
|
|---|