Re: [sage-devel] Re: Cython: declaring a typedefed enum

2014-12-29 Thread Jernej Azarija
Looks like we're on the right track - though it now seems to not recognize the scope of this enum within the library? = build/cythonized/sage/graphs/bliss.cpp: In function 'bliss::Graph* __pyx_f_4sage_6graphs_5bliss_bliss_graph(PyObject*, PyObject*, PyObject*, PyObject*)': build/cythonized/s

Re: [sage-devel] Re: Cython: declaring a typedefed enum

2014-12-29 Thread Volker Braun
You need to move the typedef outside of the class scope, see my second post. On Monday, December 29, 2014 7:57:02 PM UTC+1, Jernej Azarija wrote: > > Volker, > > this gives me the exact same error: > > > cdef cppclass Graph(AbstractGraph): > ctypedef enum Graph_SplittingHeuri

Re: [sage-devel] Re: Cython: declaring a typedefed enum

2014-12-29 Thread Jernej Azarija
Volker, this gives me the exact same error: cdef cppclass Graph(AbstractGraph): ctypedef enum Graph_SplittingHeuristic "Graph::SplittingHeuristic": ^ sage/graphs/bliss.pyx:36:22: Syntax error i

[sage-devel] Re: Cython: declaring a typedefed enum

2014-12-29 Thread Volker Braun
Also, Cython doesn't support class-level typedefs so you'll probably need a version of the "literal" trick: ctypedef enum Graph_SplittingHeuristic "Graph::SplittingHeuristic": shs_f foo bar -- You received this message because you are subscribed to the Google Groups "sage-devel" gr

[sage-devel] Re: Cython: declaring a typedefed enum

2014-12-29 Thread Volker Braun
Don't redeclare the enum values. cdef cppclass Graph(AbstractGraph): ctypedef enum SplittingHeuristic: shs_f foo bar On Monday, December 29, 2014 3:27:16 PM UTC+1, Jernej Azarija wrote: > > Dear sage-devel, > > I have another question related to Cython.