[Cython] Supporting cython.operator in C

2016-05-31 Thread Jeroen Demeyer

The following code

cimport cython.operator
cdef long foo(long x, long y):
return cython.operator.comma(x, y)

gives AttributeError: 'CBinopNode' object has no attribute 
'analyse_c_operation'


Is there any fundamental reason why such operators are only implemented 
for C++ and not pure C? What would be needed to support such operators in C?



Jeroen.
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel


Re: [Cython] Supporting cython.operator in C

2016-05-31 Thread Robert Bradshaw
I can't think of any fundamental reason these couldn't be implemented
in C, but there's really no need to do so as they can't be overridden
in C.

On Tue, May 31, 2016 at 3:28 AM, Jeroen Demeyer  wrote:
> The following code
>
> cimport cython.operator
> cdef long foo(long x, long y):
> return cython.operator.comma(x, y)
>
> gives AttributeError: 'CBinopNode' object has no attribute
> 'analyse_c_operation'
>
> Is there any fundamental reason why such operators are only implemented for
> C++ and not pure C? What would be needed to support such operators in C?
>
>
> Jeroen.
> ___
> cython-devel mailing list
> cython-devel@python.org
> https://mail.python.org/mailman/listinfo/cython-devel
___
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel