]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add a comment for some code I don't understand. Why would needsfree
authorNeal Norwitz <nnorwitz@gmail.com>
Thu, 18 Jan 2007 07:16:31 +0000 (07:16 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Thu, 18 Jan 2007 07:16:31 +0000 (07:16 +0000)
be true if we didn't malloc the code?  Seems like the code is wrong
or could use comments.

Also verify if the buildbots are working properly for the 2.5 branch.

Modules/_ctypes/_ctypes.c

index 08977ebaabbf76bbd04067192e750596764e8b80..89c5aaea55bd2ac7cfcbfe6d0c056fe51753ec9f 100644 (file)
@@ -2199,6 +2199,7 @@ static void CData_MallocBuffer(CDataObject *obj, StgDictObject *dict)
        if ((size_t)dict->size <= sizeof(obj->b_value)) {
                /* No need to call malloc, can use the default buffer */
                obj->b_ptr = (char *)&obj->b_value;
+               /* XXX(nnorwitz): shouldn't b_needsfree be 0? */
                obj->b_needsfree = 1;
        } else {
                /* In python 2.4, and ctypes 0.9.6, the malloc call took about