
Thank you Anthony and Joe. I thought that all arguments should be passed into pointers. The introductary example in the python reference documentation about Python extension confused me. I hope that the mentioned example will be changed to something simpler.
On Tue, 14 Aug 2007 17:34:28 +0200, Anthony Tuininga <anthony.tuininga@gmail.com> wrote:
Spray Webbhotell. Ingen startkostnad, 3 månader gratis och fri support. Perfekt för dig som ska starta en egen webbplats. http://www.spray.se/kampanj

In an attempt to redeem my previous blindness:
Thank you Anthony and Joe. I thought that all arguments should be passed into pointers.
By passing the address of a double, you *are* passing a pointer.
Which specific example did you find confusing? I'm guessing the 'spam' example at http://docs.python.org/ext/simpleExample.html, as it does:
const char *command;
int sts;
if (!PyArg_ParseTuple(args, "s", &command))
return NULL;
and strings are somewhat "special", in that a pointer is the "native" type of a string, so a pointer to a pointer is indeed what is passed. If that example also parsed an integer it might have made things a little clearer...
Cheers,
Mark

In an attempt to redeem my previous blindness:
Thank you Anthony and Joe. I thought that all arguments should be passed into pointers.
By passing the address of a double, you *are* passing a pointer.
Which specific example did you find confusing? I'm guessing the 'spam' example at http://docs.python.org/ext/simpleExample.html, as it does:
const char *command;
int sts;
if (!PyArg_ParseTuple(args, "s", &command))
return NULL;
and strings are somewhat "special", in that a pointer is the "native" type of a string, so a pointer to a pointer is indeed what is passed. If that example also parsed an integer it might have made things a little clearer...
Cheers,
Mark
participants (2)
-
Ali Alhakim
-
Mark Hammond