1. 10 May, 2000 1 commit
    • Guido van Rossum's avatar
      Trent Mick: · 763d15ad
      Guido van Rossum authored
      Use "win32" for sys.platform on Win64 instead of "win32" because:
      1. While it may be confusing to the Python scriptor on Win64 that he has to
         check for win*32*, that is something that he will learn the first time. It
         is better than the alternative of the scriptor happily using "win64" and
         then that code not running on Win32 for no good reason.
      2. The main question is: is Win64 so much more like Win32 than different from
         it that the common-case general Python programmer should not ever have to
         make the differentiation in his Python code. Or, at least, enough so that
         such differentiation by the Python scriptor is rare enough that some other
         provided mechanism is sufficient (even preferable). Currently the answer
         is yes. Hopefully MS will not change this answer.
      763d15ad
  2. 09 May, 2000 29 commits
  3. 08 May, 2000 10 commits
    • Guido van Rossum's avatar
      bd65d1ca
    • Guido van Rossum's avatar
      The usual... · ffd44346
      Guido van Rossum authored
      ffd44346
    • Guido van Rossum's avatar
      aa545760
    • Guido van Rossum's avatar
      Deleting all stdwin library modules. · cd67fbf0
      Guido van Rossum authored
      cd67fbf0
    • Jeremy Hylton's avatar
      if the GzipFile constructor fails, the __del__ method is still · e13418bd
      Jeremy Hylton authored
      called.  catch the resulting AttributeError and exit cleanly.
      e13418bd
    • Guido van Rossum's avatar
      Trent Mick: · caf57912
      Guido van Rossum authored
      Fix overflow bug in ldexp(x, exp). The 'exp' argument maps to a C int for the
      math library call [double ldexp(double, int)], however the 'd'
      PyArg_ParseTuple formatter was used to yield a double, which was subsequently
      cast to an int. This could overflow.
      
      [GvR: mysteriously, on Solaris 2.7, ldexp(1, 2147483647) returns Inf
      while ldexp(1, 2147483646) raises OverflowError; this seems a bug in
      the math library (it also takes a real long time to compute the
      Inf outcome).  Does this point to a bug in the CHECK() macro?  It
      should have discovered that the result was outside the HUGE_VAL range.]
      caf57912
    • Guido van Rossum's avatar
      Trent Mick: · bca52aa4
      Guido van Rossum authored
      The following modules are specifically excluded in the Win64 build:
      audioop, binascii, imageop, rgbimg. They are advertised as heavily 32-bit
      dependent.  [They should probably be fixed!  --GvR]
      bca52aa4
    • Guido van Rossum's avatar
      Trent Mick: · e84fa5f1
      Guido van Rossum authored
      Changes to PC\config.[hc] for Win64. MSVC defines _WINxx to differentiate the
      various windows platforms. Python's MS_WINxx are keyed off of these. Note
      that _WIN32 (and hence MS_WIN32 in Python) are defined on Win32 *and* on
      Win64. This is for compatibility reasons. The idea is that the common case is
      that code specific to Win32 will also work on Win64 rather than being
      specific to Win32 (i.e. there is more the same than different in WIn32 and
      Win64).
      
      The following modules are specifically excluded in the Win64 build:
      audioop, binascii, imageop, rgbimg. They are advertised as heavily 32-bit
      dependent.  [They should probably be fixed!  --GvR]
      
      The patch to config.h looks big but it really is not. These are the effective
      changes:
      - MS_WINxx are keyed off _WINxx
      - SIZEOF_VOID_P is set to 8 for Win64
      - COMPILER string is changed appropriately for Win64
      e84fa5f1
    • Guido van Rossum's avatar
      Trent Mick: · a3ba3f4e
      Guido van Rossum authored
      Fix the string methods that implement slice-like semantics with
      optional args (count, find, endswith, etc.) to properly handle
      indeces outside [INT_MIN, INT_MAX]. Previously the "i" formatter
      for PyArg_ParseTuple was used to get the indices. These could overflow.
      
      This patch changes the string methods to use the "O&" formatter with
      the slice_index() function from ceval.c which is used to do the same
      job for Python code slices (e.g. 'abcabcabc'[0:1000000000L]). slice_index()
      is renamed _PyEval_SliceIndex() and is now exported. As well, the return
      values for success/fail were changed to make slice_index directly
      usable as required by the "O&" formatter.
      
      [GvR: shouldn't a similar patch be applied to unicodeobject.c?]
      a3ba3f4e
    • Guido van Rossum's avatar
      Trent Mick: · 79281d7a
      Guido van Rossum authored
      Change static slice_index() to extern _PyEval_SliceIndex() (with
      different return value interpretation: 0 for failure, 1 for success).
      79281d7a