[Pyrex] cdef methods still unclear

Helmut Jarausch jarausch at skynet.be
Tue Mar 7 17:00:02 CET 2006


Sorry, bothering you again,
but the documentation is short!

I'd like to have a cdef function within
an extension type which is only called
by other Pyrex functions.
But I can't even define it.

What's wrong with

cdef class Document:
  cdef char* buffer
  cdef int   buffer_len

  cdef char* iso1_to_utf(char* in):
# ------------------ Expected ')'  <<<<< ERROR
    return in


Furthermore, would it be possible for this
iso1_to_utf to access self.buffer ?

Many thanks for a hint,

Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany



More information about the Pyrex mailing list