We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04b3252 commit 6401bbcCopy full SHA for 6401bbc
Modules/_ctypes/_ctypes.c
@@ -3112,7 +3112,9 @@ static PyType_Spec pycdata_spec = {
3112
static int
3113
PyCData_MallocBuffer(CDataObject *obj, StgInfo *info)
3114
{
3115
- // We don't have to lock in this function
+ /* 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. */
3118
if ((size_t)info->size <= sizeof(obj->b_value)) {
3119
/* No need to call malloc, can use the default buffer */
3120
obj->b_ptr = (char *)&obj->b_value;
0 commit comments