in reply to Re^22: Interleaving bytes in a string quickly
in thread Interleaving bytes in a string quickly
uint8 i = 2; uint16 j = i; Does the second assignment change the meaning of 2?
Cheap theatrics. Cos now int i = -1; uint j = i; it does.
Presumably you mean "anything else that might cause perl to use the 32/64-bit string format",
Nope! I meant exactly what I said.
Paraphrase: If I populate the PV of a perl scalar with byte values, and later call SvPVX() to gain access to those byte values, I will get back exactly what I put in them...unless in the interim, I explicitly do something to change them. No presumptions or assumptions. Simply fact.
And using SvPVX() will NEVER cause it to
silently encode your bytes using UTF-8.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^24: Interleaving bytes in a string quickly
by ikegami (Patriarch) on Mar 01, 2010 at 14:50 UTC | |
by BrowserUk (Patriarch) on Mar 01, 2010 at 14:59 UTC | |
by ikegami (Patriarch) on Mar 01, 2010 at 15:13 UTC | |
by BrowserUk (Patriarch) on Mar 01, 2010 at 16:20 UTC | |
by ikegami (Patriarch) on Mar 01, 2010 at 17:14 UTC | |
| |
by BrowserUk (Patriarch) on Mar 01, 2010 at 16:43 UTC |