The Python core API provides multiple functions for the allocation of string objects, specifically providing an API call that allows for either the allocation or reallocation of a PyStringObject. This function, PyString_FromStringAndSize() takes two parameters:a pointer and a signed integer. If the pointer is non-NULL then the memory pointed to it is reallocated to the size specified by the second parameter. If the pointer is NULL then the number of bytes specified by the integer are allocated and returned.
http://www.securiteam.com/unixfocus/5PP0D0UO0E.html


Reply With Quote
