Skip to content

Commit 6401bbc

Browse files
committed
Clarify comment
1 parent 04b3252 commit 6401bbc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Modules/_ctypes/_ctypes.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3112,7 +3112,9 @@ static PyType_Spec pycdata_spec = {
31123112
static int
31133113
PyCData_MallocBuffer(CDataObject *obj, StgInfo *info)
31143114
{
3115-
// We don't have to lock in this function
3115+
/* We don't have to lock in this function, because it's only
3116+
used in constructors and therefore does not have concurrent
3117+
access. */
31163118
if ((size_t)info->size <= sizeof(obj->b_value)) {
31173119
/* No need to call malloc, can use the default buffer */
31183120
obj->b_ptr = (char *)&obj->b_value;

0 commit comments

Comments
 (0)