Boost logo

Boost :

From: Rainer Deyke (root_at_[hidden])
Date: 2001-04-03 10:50:57


----- Original Message -----
From: "Karl Bellve" <Karl.Bellve_at_[hidden]>
To: "Boost" <boost_at_[hidden]>
Sent: Tuesday, April 03, 2001 8:06 AM
Subject: [boost] BPL and STDIO

> static struct _object *s_stdout(PyObject *self, PyObject *args)
> {
> char *string;
>
> if (!PyArg_ParseTuple(args, "s", &string))
> return Py_None;
>
> // do something with the string
>
> return Py_None;
> }

Whatever else you're doing wrong, you forgot to 'Py_INCREF(Py_None);' before
returning. And why are you using 'PyArg_ParseTuple' if bpl can do it for
you?

--
Rainer Deyke (root_at_[hidden])
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk