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
Kirill Smelkov
cython
Commits
7e428219
Commit
7e428219
authored
Jul 26, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
micro optimisation in globals()
parent
cb2928cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
Cython/Utility/Builtins.c
Cython/Utility/Builtins.c
+2
-1
No files found.
Cython/Utility/Builtins.c
View file @
7e428219
...
...
@@ -12,6 +12,7 @@ static PyObject* __Pyx_Globals(void); /*proto*/
//////////////////// Globals ////////////////////
//@substitute: naming
//@requires: ObjectHandling.c::GetAttr
// This is a stub implementation until we have something more complete.
// Currently, we only handle the most common case of a read-only dict
...
...
@@ -40,7 +41,7 @@ static PyObject* __Pyx_Globals(void) {
PyObject
*
name
=
PyList_GET_ITEM
(
names
,
i
);
#endif
if
(
!
PyDict_Contains
(
globals
,
name
))
{
PyObject
*
value
=
PyObject
_GetAttr
(
$
module_cname
,
name
);
PyObject
*
value
=
__Pyx
_GetAttr
(
$
module_cname
,
name
);
if
(
!
value
)
{
#if CYTHON_COMPILING_IN_PYPY
Py_DECREF
(
name
);
...
...
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