• Jeremy Hylton's avatar
    Undo needless INCREF chicanery introduced by SF patch #450702. · ba3dd999
    Jeremy Hylton authored
        Apparently this patch (rev 2.41) replaced all the good old "s#"
        formats in PyArg_ParseTuple() with "S".  Then it did
        PyString_FromStringAndSize() to get back the values setup by the
        "s#" format.  It also incref'd and decref'd the string obtained by
        "S" even though the argument tuple had a reference to it.
    
    Replace PyString_AsString() calls with PyString_AS_STRING().
    
        A good rule of thumb -- if you never check the return value of
        PyString_AsString() to see if it's NULL, you ought to be using the
        macro <wink>.
    ba3dd999
zlibmodule.c 26.4 KB