Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2a6259c

Browse files
committed
Prefer PyDict_GET_SIZE over PyDict_Size
1 parent 30758ba commit 2a6259c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/structseq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ structseq_replace(PyStructSequence *self, PyObject *args, PyObject *kwargs)
414414
result->ob_item[i] = ob;
415415
}
416416
// Check if there are any unexpected fields.
417-
if (PyDict_Size(kwargs) > 0) {
417+
if (PyDict_GET_SIZE(kwargs) > 0) {
418418
PyObject *names = PyDict_Keys(kwargs);
419419
if (names) {
420420
PyErr_Format(PyExc_TypeError, "Got unexpected field name(s): %R", names);

0 commit comments

Comments
 (0)