An error occurred fetching the project authors.
  1. 17 Oct, 2001 4 commits
  2. 16 Oct, 2001 7 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
    • 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
    • Jeremy Hylton's avatar
      Remove many calls to set MemoryError exceptions. · 9bc9d66e
      Jeremy Hylton authored
      When PyString_FromStringAndSize() and _PyString_Resize() fail, they
      set an exception.  There's no need to set a new exception.
      9bc9d66e
    • Jeremy Hylton's avatar
      Reformat! · 9714f99d
      Jeremy Hylton authored
      Consistently indent 4 spaces.
      Use whitespace around operators.
      Put braces in the right places.
      9714f99d
    • Jeremy Hylton's avatar
      [ #403753 ] zlib decompress; uncontrollable memory usage · 511e2cac
      Jeremy Hylton authored
      Mostly by Toby Dickenson and Titus Brown.
      
      Add an optional argument to a decompression object's decompress()
      method.  The argument specifies the maximum length of the return
      value.  If the uncompressed data exceeds this length, the excess data
      is stored as the unconsumed_tail attribute.  (Not to be confused with
      unused_data, which is a separate issue.)
      
      Difference from SF patch: Default value for unconsumed_tail is ""
      rather than None.  It's simpler if the attribute is always a string.
      511e2cac
  3. 09 Oct, 2001 1 commit
  4. 08 Sep, 2001 1 commit
  5. 07 Sep, 2001 1 commit
  6. 22 Feb, 2001 1 commit
  7. 21 Feb, 2001 1 commit
    • Andrew M. Kuchling's avatar
      Patch #103373 from Donovan Baarda: This patch: · 9aff4a2a
      Andrew M. Kuchling authored
        * fixes the zlib decompress sync flush bug as reported in bug #124981
        * avoids repeat calls to (in|de)flateEnd when destroying (de)compression
          objects
        * raises exception when allocating unused_data fails
        * fixes memory leak when allocating unused_data fails
        * raises exception when allocating decompress data fails
        * removes vestigial code from decompress flush now that decompression
          returns all available data
        * tidies code so object compress/decompress/flush routines are consistent
      9aff4a2a
  8. 31 Jan, 2001 2 commits
  9. 09 Oct, 2000 1 commit
  10. 03 Aug, 2000 1 commit
  11. 21 Jul, 2000 1 commit
    • Thomas Wouters's avatar
      Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)', · f3f33dcf
      Thomas Wouters authored
      and a couple of functions that were missed in the previous batches. Not
      terribly tested, but very carefully scrutinized, three times.
      
      All these were found by the little findkrc.py that I posted to python-dev,
      which means there might be more lurking. Cases such as this:
      
      long
      func(a, b)
      	long a;
      	long b; /* flagword */
      {
      
      and other cases where the last ; in the argument list isn't followed by a
      newline and an opening curly bracket. Regexps to catch all are welcome, of
      course ;)
      f3f33dcf
  12. 10 Jul, 2000 1 commit
  13. 03 May, 2000 1 commit
    • Guido van Rossum's avatar
      Vladimir Marangozov's long-awaited malloc restructuring. · b18618da
      Guido van Rossum authored
      For more comments, read the patches@python.org archives.
      For documentation read the comments in mymalloc.h and objimpl.h.
      
      (This is not exactly what Vladimir posted to the patches list; I've
      made a few changes, and Vladimir sent me a fix in private email for a
      problem that only occurs in debug mode.  I'm also holding back on his
      change to main.c, which seems unnecessary to me.)
      b18618da
  14. 06 Apr, 2000 1 commit
  15. 29 Feb, 2000 1 commit
  16. 22 Dec, 1999 1 commit
  17. 20 Dec, 1999 1 commit
  18. 12 Apr, 1999 1 commit
  19. 07 Apr, 1999 1 commit
  20. 25 Mar, 1999 1 commit
  21. 22 Mar, 1999 1 commit
  22. 29 Jan, 1999 1 commit
  23. 28 Jan, 1999 1 commit
  24. 06 Jan, 1999 1 commit
  25. 21 Dec, 1998 2 commits
  26. 18 Dec, 1998 2 commits
    • Jeremy Hylton's avatar
      patches from Andrew · a37e2445
      Jeremy Hylton authored
      NOTE: There is still a bug of some sort in the behavior of zlib.  In
      at least one case, inflate returns Z_OK (which is typically
      interpreted to mean that more output space is needed) when it has
      finished inflating a buffer.  This has been reported as a bug to the
      zlib maintainers; we may need to change the Python interface.
      a37e2445
    • Fred Drake's avatar
      When _PyString_Resize() reports failure, the variable referring to the · 6de7d0c3
      Fred Drake authored
      string we wanted to resize is set to NULL.  Don't Py_DECREF() those
      variables!  (5 places)
      6de7d0c3
  27. 04 Dec, 1998 1 commit
  28. 07 Jul, 1998 1 commit