Meador Inge <mead...@gmail.com> added the comment:

On Mon, Jul 23, 2012 at 5:04 PM, Martin v. Löwis <rep...@bugs.python.org> wrote:

> The patch that Meador committed is incorrect: METH_NOARGS functions
> still take a PyObject* args argument, which will be NULL. I'm puzzled, as
> Serhiy's original patch was correct.

I almost committed the two-argument version with the 'unused' parameter, but
then I had the bright idea to look at how '__sizeof__' is implemented elsewhere
in the interpreter:

  static PyObject *
  list_sizeof(PyListObject *self);
  static PyObject *
  dict_sizeof(PyDictObject *mp);
  static PyObject *
  set_sizeof(PySetObject *so);

  etc ...

So I dropped the 'unused' parmeter for the 'struct' implementation:

   static PyObject *
   s_sizeof(PyStructObject *self);

I will happily fix it, but if it is wrong one place, then it is wrong
everywhere.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15402>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to