Hello, I would like to write a Cython wrapper for a C++ library. Since the library in question requires me to pass C++ objects, I am trying to figure out how to do it in Cython. I am having some trouble using the construct new.
The minimal example of the problem being resembled by the following program: ========= min.pyx ========== from libcpp cimport bool as bool def foo(G): cpdef bool **adj adj = new bool*[10] ========= min.pyx ========== ========================== When trying to load the example (Ioad min.pyx) I get the following error: def foo(G): cpdef bool **adj adj = new bool*[10] ^ ------------------------------------------------------------ _home_azi_7630814_mcqd_min_pyx_0.pyx:13:23: Expected ')', found 'NEWLINE' =========================== What exactly is going on? The same thing happens if I want to create some other C++ object. Best, Jernej -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.