Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
335a1b21
Commit
335a1b21
authored
Mar 16, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use __Pyx_PyObject_GetAttrStr() in some more places
parent
f65e44a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
Cython/Utility/ImportExport.c
Cython/Utility/ImportExport.c
+3
-2
Cython/Utility/ObjectHandling.c
Cython/Utility/ObjectHandling.c
+4
-2
No files found.
Cython/Utility/ImportExport.c
View file @
335a1b21
...
...
@@ -14,6 +14,7 @@
static
PyObject
*
__Pyx_Import
(
PyObject
*
name
,
PyObject
*
from_list
,
int
level
);
/*proto*/
/////////////// Import ///////////////
//@requires: ObjectHandling.c::PyObjectGetAttrStr
//@substitute: naming
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
*
list
;
#if PY_VERSION_HEX < 0x03030000
PyObject
*
py_import
=
0
;
py_import
=
__Pyx_
GetAttrString
(
$
builtins_cname
,
"__import__"
);
PyObject
*
py_import
;
py_import
=
__Pyx_
PyObject_GetAttrStr
(
$
builtins_cname
,
PYIDENT
(
"__import__"
)
);
if
(
!
py_import
)
goto
bad
;
#endif
...
...
Cython/Utility/ObjectHandling.c
View file @
335a1b21
...
...
@@ -659,6 +659,7 @@ static CYTHON_INLINE PyObject* __Pyx_Py{{type}}_GetSlice(
static
PyObject
*
__Pyx_FindPy2Metaclass
(
PyObject
*
bases
);
/*proto*/
/////////////// FindPy2Metaclass ///////////////
//@requires: PyObjectGetAttrStr
static
PyObject
*
__Pyx_FindPy2Metaclass
(
PyObject
*
bases
)
{
PyObject
*
metaclass
;
...
...
@@ -666,7 +667,7 @@ static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) {
#if PY_MAJOR_VERSION < 3
if
(
PyTuple_Check
(
bases
)
&&
PyTuple_GET_SIZE
(
bases
)
>
0
)
{
PyObject
*
base
=
PyTuple_GET_ITEM
(
bases
,
0
);
metaclass
=
PyObject_GetAt
tr
(
base
,
PYIDENT
(
"__class__"
));
metaclass
=
__Pyx_PyObject_GetAttrS
tr
(
base
,
PYIDENT
(
"__class__"
));
if
(
!
metaclass
)
{
PyErr_Clear
();
metaclass
=
(
PyObject
*
)
Py_TYPE
(
base
);
...
...
@@ -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*/
/////////////// Py3ClassCreate ///////////////
//@requires: PyObjectGetAttrStr
static
PyObject
*
__Pyx_Py3MetaclassPrepare
(
PyObject
*
metaclass
,
PyObject
*
bases
,
PyObject
*
name
,
PyObject
*
qualname
,
PyObject
*
mkw
,
PyObject
*
modname
,
PyObject
*
doc
)
{
...
...
@@ -749,7 +751,7 @@ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases,
PyObject
*
pargs
;
PyObject
*
ns
;
prep
=
PyObject_GetAt
tr
(
metaclass
,
PYIDENT
(
"__prepare__"
));
prep
=
__Pyx_PyObject_GetAttrS
tr
(
metaclass
,
PYIDENT
(
"__prepare__"
));
if
(
!
prep
)
{
if
(
!
PyErr_ExceptionMatches
(
PyExc_AttributeError
))
return
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment