On Mar 11, 2009, at 6:05 AM, Dag Sverre Seljebotn wrote:
> Sturla Molden wrote:
>> Luke wrote:
>>
>>> I have a C++ function like this:
>>>
>>> void constraint(double& x, double& dxdt)
>>> {
>>> dxdt[0] = ...
>>> dxdt[1] = ...
>>> ....
>>> dxdt[n] = ...
>>> }
>>>
>>> How would I properly wrap this function in the .pyx file? And how
>>> would calling it in Python work?
>>>
>> I think you can just say
>>
>> cdef extern from "constraint.h":
>> void constraint(double x, double dxdt)
>>
>> as the generated C++ should be identical.
>>
> Good point! Please disregard my previous mail about this, I was wrong,
> and this is right.
Is this documented in the wiki anywhere?
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev