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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
ab805949
Commit
ab805949
authored
May 17, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify __Pyx_Globals() a little
parent
0624c00a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
Cython/Utility/Builtins.c
Cython/Utility/Builtins.c
+3
-11
No files found.
Cython/Utility/Builtins.c
View file @
ab805949
...
@@ -21,14 +21,9 @@ static PyObject* __Pyx_Globals(void); /*proto*/
...
@@ -21,14 +21,9 @@ static PyObject* __Pyx_Globals(void); /*proto*/
static
PyObject
*
__Pyx_Globals
(
void
)
{
static
PyObject
*
__Pyx_Globals
(
void
)
{
Py_ssize_t
i
;
Py_ssize_t
i
;
//PyObject *d;
PyObject
*
names
;
PyObject
*
names
=
NULL
;
PyObject
*
globals
=
$
moddict_cname
;
PyObject
*
globals
=
PyObject_GetAttr
(
$
module_cname
,
PYIDENT
(
"__dict__"
));
Py_INCREF
(
globals
);
if
(
!
globals
)
{
PyErr_SetString
(
PyExc_TypeError
,
"current module must have __dict__ attribute"
);
goto
bad
;
}
names
=
PyObject_Dir
(
$
module_cname
);
names
=
PyObject_Dir
(
$
module_cname
);
if
(
!
names
)
if
(
!
names
)
goto
bad
;
goto
bad
;
...
@@ -62,9 +57,6 @@ static PyObject* __Pyx_Globals(void) {
...
@@ -62,9 +57,6 @@ static PyObject* __Pyx_Globals(void) {
}
}
Py_DECREF
(
names
);
Py_DECREF
(
names
);
return
globals
;
return
globals
;
// d = PyDictProxy_New(globals);
// Py_DECREF(globals);
// return d;
bad:
bad:
Py_XDECREF
(
names
);
Py_XDECREF
(
names
);
Py_XDECREF
(
globals
);
Py_XDECREF
(
globals
);
...
...
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