Commit 335a1b21 authored by Stefan Behnel's avatar Stefan Behnel

use __Pyx_PyObject_GetAttrStr() in some more places

parent f65e44a5
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/
/////////////// Import /////////////// /////////////// Import ///////////////
//@requires: ObjectHandling.c::PyObjectGetAttrStr
//@substitute: naming //@substitute: naming
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
...@@ -23,8 +24,8 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { ...@@ -23,8 +24,8 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
PyObject *empty_dict = 0; PyObject *empty_dict = 0;
PyObject *list; PyObject *list;
#if PY_VERSION_HEX < 0x03030000 #if PY_VERSION_HEX < 0x03030000
PyObject *py_import = 0; PyObject *py_import;
py_import = __Pyx_GetAttrString($builtins_cname, "__import__"); py_import = __Pyx_PyObject_GetAttrStr($builtins_cname, PYIDENT("__import__"));
if (!py_import) if (!py_import)
goto bad; goto bad;
#endif #endif
......
...@@ -659,6 +659,7 @@ static CYTHON_INLINE PyObject* __Pyx_Py{{type}}_GetSlice( ...@@ -659,6 +659,7 @@ static CYTHON_INLINE PyObject* __Pyx_Py{{type}}_GetSlice(
static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/ static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/
/////////////// FindPy2Metaclass /////////////// /////////////// FindPy2Metaclass ///////////////
//@requires: PyObjectGetAttrStr
static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) { static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) {
PyObject *metaclass; PyObject *metaclass;
...@@ -666,7 +667,7 @@ static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) { ...@@ -666,7 +667,7 @@ static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) {
#if PY_MAJOR_VERSION < 3 #if PY_MAJOR_VERSION < 3
if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
PyObject *base = PyTuple_GET_ITEM(bases, 0); PyObject *base = PyTuple_GET_ITEM(bases, 0);
metaclass = PyObject_GetAttr(base, PYIDENT("__class__")); metaclass = __Pyx_PyObject_GetAttrStr(base, PYIDENT("__class__"));
if (!metaclass) { if (!metaclass) {
PyErr_Clear(); PyErr_Clear();
metaclass = (PyObject*) Py_TYPE(base); metaclass = (PyObject*) Py_TYPE(base);
...@@ -742,6 +743,7 @@ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, ...@@ -742,6 +743,7 @@ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases,
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw); /*proto*/ static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw); /*proto*/
/////////////// Py3ClassCreate /////////////// /////////////// Py3ClassCreate ///////////////
//@requires: PyObjectGetAttrStr
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
...@@ -749,7 +751,7 @@ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, ...@@ -749,7 +751,7 @@ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases,
PyObject *pargs; PyObject *pargs;
PyObject *ns; PyObject *ns;
prep = PyObject_GetAttr(metaclass, PYIDENT("__prepare__")); prep = __Pyx_PyObject_GetAttrStr(metaclass, PYIDENT("__prepare__"));
if (!prep) { if (!prep) {
if (!PyErr_ExceptionMatches(PyExc_AttributeError)) if (!PyErr_ExceptionMatches(PyExc_AttributeError))
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment