[Python-bugs-list] [ python-Bugs-456005 ] PyArg_ParseTuple failure in Python 2.2s2

noreply@sourceforge.net noreply@sourceforge.net
Mon, 27 Aug 2001 20:59:26 -0700


Bugs item #456005, was opened at 2001-08-27 20:59
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=456005&group_id=5470

Category: Python Interpreter Core
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Billy G. Allie (ballie01)
Assigned to: Nobody/Anonymous (nobody)
Summary: PyArg_ParseTuple failure in Python 2.2s2

Initial Comment:
The following code fails with size being set to
135270484 instead of being left at zero when no
arguements are passed.  This worked in Python 2.1.1.

    ...
    int         fd, cur, end, size, remaining = 0;

    if (!PgLargeObject_check((PyObject *)self, 
PGRES_LO_OPENED|PGRES_LO_READ))
        return (PyObject *)NULL;

    if (!PyArg_ParseTuple(args,"|i:read", &size))
        return (PyObject *)NULL;
    ...

At this point, when the method is called with no
arguments, size is nolonger zero!

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=456005&group_id=5470