[project @ 2002-12-17 11:39:41 by simonmar]
authorsimonmar <unknown>
Tue, 17 Dec 2002 11:39:42 +0000 (11:39 +0000)
committersimonmar <unknown>
Tue, 17 Dec 2002 11:39:42 +0000 (11:39 +0000)
commit4be8b8b3051b020ef813176b75c21d11ebaab1d9
treecd3411764f62117f17475cf37d6c4c7ac88a7708
parent419f4bd4911d69fa06caec179068838f16c65431
[project @ 2002-12-17 11:39:41 by simonmar]
Fix recent breakage on the HEAD.  This was caused by the fix to
Lex.lhs to treat primitive strings as "narrow" FastStrings in all
cases, rather than Unicode ("wide") FastStrings if the string
contained a '\0'.  The problem is that narrow FastStrings aren't set
up to handle strings containing '\0'.  They used to be, but it got
broken somewhere along the line.

This commit:

 - remove the '\0' test from unpackCStringBA (it takes a length
   argument anyway), and rename it to unpackNBytesBA.  This fixes
   the bug.

 - remove the '\0' terminator from all strings generated by the
   functions in PrimPacked.  The terminators aren't required,
   as far as I can tell.  This should have a tiny but positive
   effect on compile times.

MERGE TO STABLE
ghc/compiler/utils/FastString.lhs
ghc/compiler/utils/PrimPacked.lhs
ghc/compiler/utils/StringBuffer.lhs