[sage-devel] Re: SageX and C++ and pass-by-reference

2007-03-15 Thread didier deshommes
On Mar 15, 11:33 am, "Michael Abshoff" <[EMAIL PROTECTED]> wrote: > Martin Albrecht wrote: > > > Hi, > > > I have appended my original source of information, maybe you find this > > helpful. > > Thanks for the info. Should this be added to general SAGE documentation? I > am sure once I am though/w

[sage-devel] Re: SageX and C++ and pass-by-reference

2007-03-15 Thread Michael Abshoff
Martin Albrecht wrote: > > Hi, > > I have appended my original source of information, maybe you find this > helpful. Thanks for the info. Should this be added to general SAGE documentation? I am sure once I am though/working on the code I will have additional suggestions. > Also, (even more off-

[sage-devel] Re: SageX and C++ and pass-by-reference

2007-03-15 Thread Martin Albrecht
>> Sorry to be slightly off topic: CoCoALib 0.98 has been released to the > public under the GPL V2. I wanted to get started with bindings and since > it is a C++ library which also uses references extensively I would like to > know if there is any material besides the givaro bindings and Martin's

[sage-devel] Re: SageX and C++ and pass-by-reference

2007-03-15 Thread Michael Abshoff
Joel B. Mohler wrote: >> >> x[0] should do the trick (as it is equivalent to *x in C) and is the >> recommended way in the Pyrex documentation. But I used the deref trick >> so >> far. > > Yep, you said that in the slides in your SD3 talk. I didn't understand > the > point when I read the slides

[sage-devel] Re: SageX and C++ and pass-by-reference

2007-03-15 Thread Joel B. Mohler
On Wednesday 14 March 2007 09:36, Martin Albrecht wrote: > > My question, what's the most sensible way to call my C++ > > function 'do_something_with_a_reference' that takes a reference > > parameter? I came up with a clever hack -- put the following in your .pxd > > file: cdef extern from "NTL/ZZ

[sage-devel] Re: SageX and C++ and pass-by-reference

2007-03-14 Thread Martin Albrecht
> My question, what's the most sensible way to call my C++ > function 'do_something_with_a_reference' that takes a reference parameter? > I came up with a clever hack -- put the following in your .pxd file: cdef > extern from "NTL/ZZ.h": > ZZ ZZ_deref "*"(ZZ *z) > and then your function becom