> In "Overloading Operators" there is a comment
> "Please avoid declaring C++ objects this way. Use 'cdef Foo *f = new Foo()'"
>
> But why should it be avoided, that doesn't make sense to me.
>
I forgot answering this question.
In Cython, if we wrap a class:
cdef extern from "foo.h":
cdef cppclass Foo:
Foo(int)
Cython doesn't allow you do:
cdef Foo foo(10)
So, at least for now, you can only instanciate non-pointer C++ objects
if you have an empty contructor.
We're thinking in disallow non-pointer instanciations. But I think we
can allow it later.
--
- Danilo Freitas
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev