Robert Bradshaw wrote:
> Just trying to get a syntax, how about
>
> cdef extern from "header.h":
>      cdef cclass MyClass[TemplateParamers](BaseCPPClass):
>          int member
>          int method(int)
>
> The only concern I have is whether or not "cdef cclass" is to similar
> to "cdef class" (probably not). Any other ideas?

cdef cppclass?

Yes, I think cclass is to similar to class.

Anyway, when I proposed a Fortran syntax earlier you and Stefan made a
good point about the language specification belonging in the "cdef extern"
part, as, after all, the "header.h" file contains only C++ code.

Also consider that C++ needs namespace specifications, for instance

cdef extern ...:
    namespace std:
        cdef cppclass vector[T]: ...

or

cdef cclass std::vector[T]: ...

Dag Sverre

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to