Perhaps you noticed warnings like this when building Cython

/u/dalcinl/Devel/cython-devel/Cython/Compiler/Scanning.c:8878:
warning: '__pyx_pf_6Cython_4Plex_8Scanners_7Scanner_5queue___get__'
defined but not used
/u/dalcinl/Devel/cython-devel/Cython/Compiler/Scanning.c:8897:
warning: '__pyx_pf_6Cython_4Plex_8Scanners_7Scanner_5queue___set__'
defined but not used

What happens? Cython.Compiler.Scanning does a 'cimport' or
Cython.Plex.Scanner. The later has a typed 'cdef public list queue'
member. As it is typed (a 'list'), Cython is smart and understand that
assignements needs type-checking, and builds a 'property' with get/set
routines for this. But the get/set routines SHOULD NOT be generated on
Cython/Compiler/Scanning.c.

It seem that the fix should go to Cython/Compiler/Nodes.py, at the
begining of CVarDefNode.analyse_declarations():

        if (dest_scope.is_c_class_scope
                and self.visibility == 'public'
                and base_type.is_pyobject
                and (base_type.is_builtin_type or base_type.is_extension_type)):
            self.need_properties = []
            need_property = True
            visibility = 'private'

The line 'need_property = True' should be 'False' instead  if the
dest_scope is a cimport'ed class.

Any idea about how can I fix this?


-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to