summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-01-18 07:16:31 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-01-18 07:16:31 (GMT)
commite962300d0c839868f2ace3fc174ab1f9e19cb4e9 (patch)
tree1d21b174587e0b7858475426432a0a8b0dc5ad49 /Modules
parenteb68188a0d79979d2b41ffaac25b5059a85fa1d1 (diff)
downloadcpython-e962300d0c839868f2ace3fc174ab1f9e19cb4e9.zip
cpython-e962300d0c839868f2ace3fc174ab1f9e19cb4e9.tar.gz
cpython-e962300d0c839868f2ace3fc174ab1f9e19cb4e9.tar.bz2
Add a comment for some code I don't understand. Why would needsfree
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.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ctypes/_ctypes.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
index 08977eb..89c5aae 100644
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -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