Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PyDict_GET_SIZE is 3.7 only.
  • Loading branch information
serhiy-storchaka committed Apr 19, 2017
commit 157494bd9036e9b27b660d9dc60ac54164847504
2 changes: 1 addition & 1 deletion Modules/selectmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2023,7 +2023,7 @@ static PyObject *
kqueue_queue_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
if (PyTuple_GET_SIZE(args) ||
(kwds != NULL && PyDict_GET_SIZE(kwds))) {
(kwds != NULL && PyDict_Size(kwds))) {
PyErr_SetString(PyExc_ValueError,
"select.kqueue doesn't accept arguments");
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion Objects/exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -2809,7 +2809,7 @@ _PyErr_TrySetFromCause(const char *format, ...)
/* Ensure the instance dict is also empty */
dictptr = _PyObject_GetDictPtr(val);
if (dictptr != NULL && *dictptr != NULL &&
PyDict_GET_SIZE(*dictptr) > 0) {
PyDict_Size(*dictptr) != 0) {
/* While we could potentially copy a non-empty instance dictionary
* to the replacement exception, for now we take the more
* conservative path of leaving exceptions with attributes set
Expand Down
2 changes: 1 addition & 1 deletion Objects/setobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1561,7 +1561,7 @@ set_difference(PySetObject *so, PyObject *other)
other_size = PySet_GET_SIZE(other);
}
else if (PyDict_CheckExact(other)) {
other_size = PyDict_GET_SIZE(other);
other_size = PyDict_Size(other);
}
else {
return set_copy_and_difference(so, other);
Expand Down