1. 29 Jun, 2000 27 commits
  2. 28 Jun, 2000 13 commits
    • Guido van Rossum's avatar
      Vladimir Marangozov: · a14d2056
      Guido van Rossum authored
      This patch fixes a problem on AIX with the signed int case code in
      getargs.c, after Trent Mick's intervention about MIN/MAX overflow
      checks. The AIX compiler/optimizer generates bogus code with the
      default flags "-g -O" causing test_builtin to fail: int("10", 16) <>
      16L. Swapping the two checks in the signed int code makes the problem
      go away.
      
      Also, make the error messages fit in 80 char lines in the
      source.
      a14d2056
    • Guido van Rossum's avatar
      Vladimir Marangozov: · 1f747c6b
      Guido van Rossum authored
      Avoid calling the dealloc function, previously triggered with
      DECREF(inst).  This caused a segfault in PyDict_GetItem, called with a
      NULL dict, whenever inst->in_dict fails under low-memory conditions.
      1f747c6b
    • Guido van Rossum's avatar
      Urmpf. Quality control on this patch lapsed a bit. :-( · b28fa08d
      Guido van Rossum authored
      The depth field was never decremented inside w_object(), and it was
      never initialized in PyMarshal_WriteObjectToFile().
      
      This caused imports from .pyc files to fil mysteriously when the .pyc
      file was written by the broken code -- w_object() would bail out
      early, but PyMarshal_WriteObjectToFile() doesn't check the error or
      return an error code, and apparently the marshalling code doesn't call
      PyErr_Check() either.  (That's a separate patch if I feel like it.)
      b28fa08d
    • Guido van Rossum's avatar
      Running the program through itself reveals that one end tag was · 2e8731db
      Guido van Rossum authored
      mislabeled.
      
      (Using -c and then -e rearranges some comments, so I won't check that
      in -- but it's a good test anyway.
      
      Note that pindent is not perfect -- e.g. it doesn't know about
      triple-quoted strings!)
      2e8731db
    • Guido van Rossum's avatar
      Peter Schneider-Kamp: · f6a09691
      Guido van Rossum authored
      Problem:
      A Python program can be completed and reformatted using
      Tools/scripts/pindent.py. Unfortunately there is no option for removal
      of the generated "# end"-tags.  Although a few Python commands or a
      "grep -v '# end '" can do wonders here, there are two drawbacks:
      - not everyone has grep/time to write a Python script
      - it is not checked whether the "# end"-tags were used validly
      
      Solution:
      add extra option "-e" (eliminate) to pindent.py
      f6a09691
    • Guido van Rossum's avatar
      Trent Mick: · fb5d4e39
      Guido van Rossum authored
      Fix warnings on 64-bit build build of signalmodule.c
      
      - Though I know that SIG_DFL and SIG_IGN are just small constants,
      there are cast to function pointers so the appropriate Python call is
      PyLong_FromVoidPtr so that the pointer value cannot overflow on Win64
      where sizeof(long) < sizeof(void*).
      fb5d4e39
    • Guido van Rossum's avatar
      Trent Mick: · 8d688ccb
      Guido van Rossum authored
      This patch fixes cPickle.c for 64-bit platforms.
      
      - The false assumption sizeof(long) == size(void*) exists where
      PyInt_FromLong is used to represent a pointer. The safe Python call
      for this is PyLong_FromVoidPtr. (On platforms where the above
      assumption *is* true a PyInt is returned as before so there is no
      effective change.)
      
      - use size_t instead of int for some variables
      8d688ccb
    • Guido van Rossum's avatar
      279fdd94
    • Fred Drake's avatar
      Give Moshe some work to do. · 75a2215f
      Fred Drake authored
      75a2215f
    • Fred Drake's avatar
      311f3bbe
    • Fred Drake's avatar
      46043f15
    • Fred Drake's avatar
      5ed86c1c
    • Guido van Rossum's avatar