Commit b01b3fda authored by Ian Henriksen's avatar Ian Henriksen

Allocate non-reference temporaries for reference variables and

expressions.
Before, this would generate invalid C/C++ code where a reference was
declared but not initialized.
parent bfe9ebc8
......@@ -701,6 +701,8 @@ class FunctionState(object):
"""
if type.is_const and not type.is_reference:
type = type.const_base_type
if type.is_reference:
type = type.ref_base_type
if not type.is_pyobject and not type.is_memoryviewslice:
# Make manage_ref canonical, so that manage_ref will always mean
# a decref is needed.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment