[Cython] Undefined name 'entry' generate_type_import_call() 0.15.1 and trunk

Stefan Behnel stefan_ml at behnel.de
Mon Nov 21 19:04:22 CET 2011


Matteo Bertozzi, 18.11.2011 09:44:
> there's an undefined name 'entry' in ModuleNode.py
> generate_type_import_call() line 2171. I think that 'entry' should be
> replaced with 'type'.
>
>> diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
>> index 13cf6c8..ff9ca56 100644
>> --- a/Cython/Compiler/ModuleNode.py
>> +++ b/Cython/Compiler/ModuleNode.py
>> @@ -2168,7 +2168,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
>>           else:
>>               module_name = '__Pyx_BUILTIN_MODULE_NAME'
>>               if type.name in Code.non_portable_builtins_map:
>> -                condition, replacement = Code.non_portable_builtins_map[entry.name]
>> +                condition, replacement = Code.non_portable_builtins_map[type.name]
>>                   code.putln("#if %s" % condition)
>>                   code.putln('%s = __Pyx_ImportType(%s, "%s", sizeof(%s), 1); %s' % (
>>                           type.typeptr_cname,

Good catch. Thanks!

Stefan


More information about the cython-devel mailing list