Core and Builtins
-----------------
+- Issue #4346: In PyObject_CallMethod and PyObject_CallMethodObjArgs, don't
+ overwrite the error set in PyObject_GetAttr.
+
- Issue #21831: Avoid integer overflow when large sizes and offsets are given to
the buffer type.
return null_error();
func = PyObject_GetAttrString(o, name);
- if (func == NULL) {
- PyErr_SetString(PyExc_AttributeError, name);
- return 0;
- }
+ if (func == NULL)
+ return NULL;
if (!PyCallable_Check(func)) {
type_error("attribute of type '%.200s' is not callable", func);
return null_error();
func = PyObject_GetAttrString(o, name);
- if (func == NULL) {
- PyErr_SetString(PyExc_AttributeError, name);
- return 0;
- }
+ if (func == NULL)
+ return NULL;
if (!PyCallable_Check(func)) {
type_error("attribute of type '%.200s' is not callable", func);