XS for implementing these code: @data = unpack "C*", $script;
How much do you know about C?
Because the "equivalent of the above code in C makes no sense. A C string is already an array of bytes.
You don't need to pack or unpack a string(array of unsigned char), just access the elements.
If you do not understand enough C to understand that, you should think twice about using XS; cos it'll bite you in the arse. Hard.
In reply to Re: 'packlist'/'unpackstring' in XS
by BrowserUk
in thread 'packlist'/'unpackstring' in XS
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |