1. 18 Oct, 2001 8 commits
  2. 17 Oct, 2001 26 commits
  3. 16 Oct, 2001 6 commits
    • 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
    • Jeremy Hylton's avatar
      Simplify and fix error handling for most cases. · 9d620d01
      Jeremy Hylton authored
      Many functions used a local variable called return_error, which was
      initialized to zero.  If an error occurred, it was set to true.  Most
      of the code paths checked were only executed if return_error was
      false.  goto is clearer.
      
      The code also seemed to be written under the curious assumption that
      calling Py_DECREF() on a local variable would assign the variable to
      NULL.  As a result, more of the error-exit code paths returned an
      object that had a reference count of zero instead of just returning
      NULL.  Fixed the code to explicitly assign NULL after the DECREF.
      
      A bit more reformatting, but not much.
      
      XXX Need a much better test suite for zlib, since it the current tests
      don't exercise any of this broken code.
      9d620d01
    • Tim Peters's avatar
      SF bug [#471111] inspect.getframeinfo() needs docs. · 61acf067
      Tim Peters authored
      TeX-ified its docstring.
      61acf067
    • Jeremy Hylton's avatar
      More reformatting. · 49900000
      Jeremy Hylton authored
      49900000
    • Jeremy Hylton's avatar
      Add zlib_error() helper. · 0965e084
      Jeremy Hylton authored
      It sets a ZlibError exception, using the msg from the z_stream pointer
      if one is available.
      0965e084
    • Guido van Rossum's avatar
      Fix a bug in the previous checkin. The wrong bootstrap function was · 2c40adb1
      Guido van Rossum authored
      passed to _beginthread().
      2c40adb1