[Cython] Compilation failes if a class member is named "INFINITY"

2015-01-31 Thread Michael
NFINITY" is handled wrongly; any other variable name seems to be fine. Regards, Michael ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel

Re: [Cython] Compilation failes if a class member is named "INFINITY"

2015-02-05 Thread Michael
Am 31.01.2015 um 19:48 schrieb Matthew Brett: > Hi, > > On Fri, Jan 30, 2015 at 1:49 AM, Michael wrote: >> Hello, >> >> if I try to compile the following minimal example: >> >> cdef class Test: >> >> cdef readonly int INFINITY >>

Re: [Cython] Compilation failes if a class member is named "INFINITY"

2015-02-05 Thread Michael
Am 05.02.2015 um 10:44 schrieb Stefan Behnel: > Michael schrieb am 05.02.2015 um 09:52: >> Am 31.01.2015 um 19:48 schrieb Matthew Brett: >>> On Fri, Jan 30, 2015 at 1:49 AM, Michael wrote: >>>> if I try to compile the following minimal example: >>>>

Re: [Cython] Compilation failes if a class member is named "INFINITY"

2015-02-05 Thread Michael
Am 05.02.2015 um 12:30 schrieb Greg Ewing: > Stefan Behnel wrote: >> Python extension types are just structs at the C level, and struct member >> names cannot be mangled. > > Well, in principle it *could* mangle the names in > structs that aren't declared "cdef extern". I didn't > do that in Pyrex

AC�LIO JO�O CARLOS MOREIRA DE CARVALHO AMORIM NETO

2013-06-11 Thread Michael Klein
GOULART JUCIMARA VICENTE DOS SANTOS, DAMIANA PEREIRA DE OLIVERIA, ANA ANGELICA PEREIRA ALVES, PAULO DE SIQUEIRA SILVA. PAULO DE SIQUEIRA SILVA. AMAURI CLIFE, ELEUTÉRIO LEAL, LEAL CORLETTO, CLIFE ACÍLIO LEAL. ELEUTÉRIO GOULART, VICTOR DI MELLO, JAVERT MONTEIRO, NELSON DANTAS, DANIEL DE OLIVEI

[Cython] cython --cplus --embed generates invalid code

2014-11-30 Thread Michael Enßlin
version Python 3.4.2 $ lsb_release -a No LSB modules are available. Distributor ID: Debian Description:Debian GNU/Linux unstable (sid) Release:unstable Codename: sid ~ Michael signature.asc Description: OpenPGP digital signature ___

[Cython] Cython produces invalid C code

2015-04-22 Thread Michael Enßlin
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

Re: [Cython] Cython produces invalid C code

2015-04-22 Thread Michael Enßlin
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

[Cython] Misleading error message when assigning function pointers with differing except* declarations

2015-05-07 Thread Michael Enßlin
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

[Cython] Cython generates invalid C code for some generator expressions in cdef functions

2015-05-08 Thread Michael Enßlin
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

[Cython] Feature request: Expose methods to fake stack traces

2015-06-08 Thread Michael Enßlin
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

[Cython] Cython produces invalid code for operator()

2015-06-11 Thread Michael Enßlin
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

[Cython] Compiler crash in AnalyseExpressionsTransform

2015-06-12 Thread Michael Enßlin
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() ^

[Cython] Can't call functions with multi-token template arguments such as 'char *'

2015-06-12 Thread Michael Enßlin
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

[Cython] Feature request: Flag to enable warnings when 'extern' functions are not declared 'except +'

2015-06-12 Thread Michael Enßlin
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

[Cython] Feature Request: Variadic Templates

2015-06-21 Thread Michael Enßlin
ry possible len(Us). Even worse, the .pxd file will now contain a quadratic number of wrappers (one for every possible combination of len(Ts), len(Us)), all of them extremely prone to mistakes. Thanks for reading, ~ Michael signature.asc Description: OpenPGP digital signature _

Re: [Cython] Multidimensional indexing of C++ objects

2015-07-04 Thread Michael Enßlin
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

Re: [Cython] OpenMP 4.5 array reductions

2018-09-02 Thread Klemm, Michael
. ☺ Kind regards, -michael From: cython-devel [mailto:cython-devel-bounces+michael.klemm=intel@python.org] On Behalf Of Nathan Goldbaum Sent: Friday, August 31, 2018 4:51 PM To: Core developer mailing list of the Cython compiler Subject: [Cython] OpenMP 4.5 array reductions Hi all,