C API and memory allocation

Stefan Behnel stefan_ml at behnel.de
Thu Dec 18 08:54:04 EST 2008


Aaron Brady wrote:
> I see.  Do I read correctly that 's' is only useful when the
> argument's position is known?

I assume you meant "length".


>  Otherwise you can't know its length or
> change its reference count.

The internal representation of Python byte strings is 0 terminated, so
strlen() will work.

Stefan



More information about the Python-list mailing list