[Python-3000] string C API

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Sat Sep 16 12:02:37 CEST 2006


"Martin v. Löwis" <martin at v.loewis.de> writes:

> You could play tricks with ob_size to save this field:
>
> - ob_size < 0: 8-bit data; length is abs(ob_size)
> - ob_size > 0, (ob_size & 1)==0: 16-bit data, length is ob_size/2
> - ob_size > 0, (ob_size & 1)==1: 32-bit data, length is ob_size/2

I wonder whether strings with characters outside ISO-8859-1 are common
enough that having a 16-bit representation is worth the trouble.

CLISP does have it. My language doesn't.

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/


More information about the Python-3000 mailing list