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
Show 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 @@
...
@@ -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
...
...
Cython/Utility/ObjectHandling.c
View file @
335a1b21
...
@@ -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_GetAt
tr
(
base
,
PYIDENT
(
"__class__"
));
metaclass
=
__Pyx_PyObject_GetAttrS
tr
(
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_GetAt
tr
(
metaclass
,
PYIDENT
(
"__prepare__"
));
prep
=
__Pyx_PyObject_GetAttrS
tr
(
metaclass
,
PYIDENT
(
"__prepare__"
));
if
(
!
prep
)
{
if
(
!
prep
)
{
if
(
!
PyErr_ExceptionMatches
(
PyExc_AttributeError
))
if
(
!
PyErr_ExceptionMatches
(
PyExc_AttributeError
))
return
NULL
;
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