mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fix MSVC warnings.
This commit is contained in:
parent
ad47da072a
commit
3747a0f04c
1 changed files with 2 additions and 2 deletions
|
@ -940,9 +940,9 @@ subtype_getweakref(PyObject *obj, void *context)
|
||||||
}
|
}
|
||||||
assert(obj->ob_type->tp_weaklistoffset > 0);
|
assert(obj->ob_type->tp_weaklistoffset > 0);
|
||||||
assert(obj->ob_type->tp_weaklistoffset + sizeof(PyObject *) <=
|
assert(obj->ob_type->tp_weaklistoffset + sizeof(PyObject *) <=
|
||||||
obj->ob_type->tp_basicsize);
|
(size_t)(obj->ob_type->tp_basicsize));
|
||||||
weaklistptr = (PyObject **)
|
weaklistptr = (PyObject **)
|
||||||
((void *)obj + obj->ob_type->tp_weaklistoffset);
|
((char *)obj + obj->ob_type->tp_weaklistoffset);
|
||||||
if (*weaklistptr == NULL)
|
if (*weaklistptr == NULL)
|
||||||
result = Py_None;
|
result = Py_None;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue