This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nnorwitz
Recipients
Date 2007-08-10.03:33:36
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
METH_O is easy.  Change METH_VARARGS to METH_O and the only difference is that in your function:

static void
my_meth_func(PyObject* self, PyObject* arg)

arg is now the single argument.  So you don't need to call PyArg_ParseTuple.  The code that originally looked like:


static void
my_meth_func(PyObject* self, PyObject* args) {

PyArg_ParseTuple(args, "O", &my_arg);
// use my_arg

becomes:

static void
my_meth_func(PyObject* self, PyObject* my_arg) {
// use my_arg

Hope that makes sense.

As for the length of visible vs non-visible attributes, can't you use the macros as the top of structseq.c file?

VISIBLE_SIZE, REAL_SIZE, UNNAMED_FIELDS and the _TP variants?
History
Date User Action Args
2007-08-23 15:56:42adminlinkissue1667546 messages
2007-08-23 15:56:42admincreate