projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53dd3fa
)
fix refcount bug in initial __path__ setting
author
Stefan Behnel
<stefan_ml@behnel.de>
Tue, 7 Aug 2012 13:23:15 +0000
(15:23 +0200)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Tue, 7 Aug 2012 13:23:15 +0000
(15:23 +0200)
Cython/Compiler/ModuleNode.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ModuleNode.py
b/Cython/Compiler/ModuleNode.py
index
b199565
..
c39f536
100644
(file)
--- a/
Cython/Compiler/ModuleNode.py
+++ b/
Cython/Compiler/ModuleNode.py
@@
-1845,10
+1845,12
@@
class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.globalstate.get_py_string_const(
EncodedString(decode_filename(os.path.dirname(source_path)))).cname,
code.error_goto_if_null(temp, self.pos)))
+ code.put_gotref(temp)
code.putln('if (__Pyx_SetAttrString(%s, "__path__", %s) < 0) %s;' % (
env.module_cname,
temp,
code.error_goto(self.pos)))
+ code.put_decref_clear(temp, py_object_type)
code.funcstate.release_temp(temp)
if Options.cache_builtins: