> On 1 Feb 2020, at 20:00, Greg Ewing <greg.ew...@canterbury.ac.nz> wrote: > > On 1/02/20 3:29 pm, John Skaller2 wrote: >> But the all hell breaks loose for pointers. Your hack only >> works for rvalues. > > Yes, using these it's possible for Cython to accept something > that will later be rejected by the C compiler. It's not perfect, > but it gets the job done most of the time.
My concern is that the C compiler wont reject it, the program will corrupt data or crash: int32_t *x=..; *x = 42; int64_t *x=..; *x = 42; The C compiler will overwrite 4 or 8 bytes. Which one matters. In an rvalue context it probably doesn’t matter, in an lvalue context it does. But probably this doesn’t happen in Cython. — John Skaller skal...@internode.on.net _______________________________________________ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel