Hello,

Working on creating Cython wrappers for a C library I came across a strange
problem.

I have in the C library a struct like this:

 struct my_jobs;

I also have this function, which returns the next job in the queue:

 int my_jobs(struct my_jobs *jobs);

Translating this into Cython and putting this in the .pxd file it looks
like this:

  cdef struct my_jobs
  int my_jobs(my_jobs *jobs)

During build I'm having issues because it seems that the function my_jobs()
is translated in a way that it should return a "int struct my_jobs".

The real problem I see is that I cannot have a data type and a function
sharing the same name.

How can I overcome this issue? Suppose that I wrote the C API I could
change that, but how would you really  solve this if you cannot touch
what's in upstream?

Any ways to solve this?

Thanks and regards,
Marin

-- 
Marin Atanasov Nikolov

dnaeon AT gmail DOT com
http://www.unix-heaven.org/
_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to