Hi,
on my system, --embed does not work with --cplus.
How to reproduce: Any valid pyx file works:
$ rm -f test.pyx; touch test.pyx
$ cython --embed --cplus test.pyx
$ g++ -c test.cpp -I/usr/include/python3.4m
test.cpp: In function ‘wchar_t* __Pyx_char2wchar(char*)’:
test.cpp:945:41: error: inval
Hi everybody,
Cython 0.21.1, from Debian Sid, and Cython 0.22, from Gentoo, produce
invalid C Code for the following .pyx file:
$ cat test.pyx
cimport cpython
cdef extern from "test.h":
cdef void foo(int i = 0)
def bar(self):
foo(0)
$ cat test.h
void foo(int i);
$ cython test.py
Hi,
On 23/04/15 06:25, Robert Bradshaw wrote:
> I've made this an explicit error.
thanks; I hope this will save future users some WTFs.
~mic_e
signature.asc
Description: OpenPGP digital signature
___
cython-devel mailing list
cython-devel@python
Hi,
consider the following example:
$ cat demo.pyx
cdef void (*foo)()
cdef void bar() except*:
pass
foo = bar
$ cython demo.pyx
Error compiling Cython file:
...
cdef void (*foo)()
cdef void bar() except*:
pass
foo = bar
Take the following example:
$ cat t2.pyx
cdef void read_callback():
foo = b"asdf"
bar = (c for c in foo)
$ cython t2.pyx
$ gcc -I/usr/include/python3.4m t2.c
t2.c: In function ‘__pyx_f_2t2_read_callback’:
t2.c:778:12: error: ‘None’ undeclared (first use in this function)
return
Hi everybody,
my C++ exceptions contain some stack trace information (starting with
__FILE__ and __LINE__), and I'd like to preserve that information in my
custom 'except+' translator.
Cython seems to have some internal methods to fake Python stack trace
objects, but research (and an unanswered q
Hi guys,
have a look at this:
$ cat bar.pyx
cdef extern from "foo.h":
cdef cppclass Foo:
int operator() (int arg)
int do_call (int arg)
cdef int bar(int arg):
cdef Foo foo
foo.do_call(arg)
return foo(arg)
$ cython3 --cplus bar.pyx
$ cat bar.cpp
(...)
static in
Hi,
another bug report:
mic@mic /tmp $ cat t11.pyx
cdef cppclass foo:
pass
def test():
foo()
mic@mic /tmp $ cython --cplus t11.pyx
Error compiling Cython file:
...
cdef cppclass foo:
pass
def test():
foo()
^
Hi,
it seems to be impossible to use anything but a single word as a
template type for functions.
Classes don't suffer from this issue, as seen below.
As a workaround, complex types can be ctypedef-d to a single word (also
seen below).
$ cat t10.pyx
cdef extern from "nope.h":
cdef cppclass
Hi everybody,
as you surely have guessed from the amount of Bug reports I have
recently submitted to this mailing list, I'm currently working on a
rather large Cython project.
More precisely: I'm using Cython as the glue layer between the Python
and C++ components of openage; an overview and sourc
Hi,
I'd like to see support for variadic template arguments, such as this:
test.h:
template
RetT foo(VARARGS ...);
test.pyx:
cdef extern from "test.h":
cdef RetT foo[RetT, ... VARARGS](... VARARGS)
def test():
cdef int i = foo[int, float, int](1, 2.5, 3)
This would allow Cy
Drawback 1) could be solved by declaring the operator as
cdef inline operator []()
instead of
cdef inline __getitem__()
signature.asc
Description: OpenPGP digital signature
___
cython-devel mailing list
cython-devel@python.org
https://mail.p
12 matches
Mail list logo