1. 21 Mar, 2003 1 kayıt (commit)
  2. 20 Mar, 2003 1 kayıt (commit)
  3. 29 Ock, 2003 1 kayıt (commit)
  4. 28 Ock, 2003 1 kayıt (commit)
  5. 21 Kas, 2002 1 kayıt (commit)
  6. 19 Kas, 2002 1 kayıt (commit)
  7. 18 Kas, 2002 1 kayıt (commit)
  8. 19 Agu, 2002 1 kayıt (commit)
  9. 17 Tem, 2002 1 kayıt (commit)
    • Jeremy Hylton's avatar
      staticforward bites the dust. · 938ace69
      Jeremy Hylton yazdı
      The staticforward define was needed to support certain broken C
      compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the
      static keyword when it was used with a forward declaration of a static
      initialized structure.  Standard C allows the forward declaration with
      static, and we've decided to stop catering to broken C compilers.  (In
      fact, we expect that the compilers are all fixed eight years later.)
      
      I'm leaving staticforward and statichere defined in object.h as
      static.  This is only for backwards compatibility with C extensions
      that might still use it.
      
      XXX I haven't updated the documentation.
      938ace69
  10. 13 Haz, 2002 1 kayıt (commit)
  11. 02 May, 2002 1 kayıt (commit)
  12. 09 Mar, 2002 1 kayıt (commit)
    • Tim Peters's avatar
      SF bug 525705: [2.2] underflow raise OverflowException. · dc5a5087
      Tim Peters yazdı
      Another year in the quest to out-guess random C behavior.
      
      Added macros Py_ADJUST_ERANGE1(X) and Py_ADJUST_ERANGE2(X, Y).  The latter
      is useful for functions with complex results.  Two corrections to errno-
      after-libm-call are attempted:
      
      1. If the platform set errno to ERANGE due to underflow, clear errno.
         Some unknown subset of libm versions and link options do this.  It's
         allowed by C89, but I never figured anyone would do it.
      
      2. If the platform did not set errno but overflow occurred, force
         errno to ERANGE.  C89 required setting errno to ERANGE, but C99
         doesn't.  Some unknown subset of libm versions and link options do
         it the C99 way now.
      
      Bugfix candidate, but hold off until some Linux people actually try it,
      with and without -lieee.  I'll send a help plea to Python-Dev.
      dc5a5087
  13. 11 Ara, 2001 2 kayıt (commit)
  14. 28 Kas, 2001 2 kayıt (commit)
  15. 01 Kas, 2001 4 kayıt (commit)
  16. 24 Eki, 2001 1 kayıt (commit)
  17. 05 Eki, 2001 1 kayıt (commit)
    • Guido van Rossum's avatar
      Enable GC for new-style instances. This touches lots of files, since · 9475a231
      Guido van Rossum yazdı
      many types were subclassable but had a xxx_dealloc function that
      called PyObject_DEL(self) directly instead of deferring to
      self->ob_type->tp_free(self).  It is permissible to set tp_free in the
      type object directly to _PyObject_Del, for non-GC types, or to
      _PyObject_GC_Del, for GC types.  Still, PyObject_DEL was a tad faster,
      so I'm fearing that our pystone rating is going down again.  I'm not
      sure if doing something like
      
      void xxx_dealloc(PyObject *self)
      {
      	if (PyXxxCheckExact(self))
      		PyObject_DEL(self);
      	else
      		self->ob_type->tp_free(self);
      }
      
      is any faster than always calling the else branch, so I haven't
      attempted that -- however those types whose own dealloc is fancier
      (int, float, unicode) do use this pattern.
      9475a231
  18. 19 Eyl, 2001 1 kayıt (commit)
  19. 12 Eyl, 2001 1 kayıt (commit)
  20. 11 Eyl, 2001 2 kayıt (commit)
  21. 05 Eyl, 2001 3 kayıt (commit)
  22. 04 Eyl, 2001 2 kayıt (commit)
  23. 03 Eyl, 2001 1 kayıt (commit)
  24. 31 Agu, 2001 1 kayıt (commit)
    • Guido van Rossum's avatar
      Add warning mode for classic division, almost exactly as specified in · 393661d1
      Guido van Rossum yazdı
      PEP 238.  Changes:
      
      - add a new flag variable Py_DivisionWarningFlag, declared in
        pydebug.h, defined in object.c, set in main.c, and used in
        {int,long,float,complex}object.c.  When this flag is set, the
        classic division operator issues a DeprecationWarning message.
      
      - add a new API PyRun_SimpleStringFlags() to match
        PyRun_SimpleString().  The main() function calls this so that
        commands run with -c can also benefit from -Dnew.
      
      - While I was at it, I changed the usage message in main() somewhat:
        alphabetized the options, split it in *four* parts to fit in under
        512 bytes (not that I still believe this is necessary -- doc strings
        elsewhere are much longer), and perhaps most visibly, don't display
        the full list of options on each command line error.  Instead, the
        full list is only displayed when -h is used, and otherwise a brief
        reminder of -h is displayed.  When -h is used, write to stdout so
        that you can do `python -h | more'.
      
      Notes:
      
      - I don't want to use the -W option to control whether the classic
        division warning is issued or not, because the machinery to decide
        whether to display the warning or not is very expensive (it involves
        calling into the warnings.py module).  You can use -Werror to turn
        the warnings into exceptions though.
      
      - The -Dnew option doesn't select future division for all of the
        program -- only for the __main__ module.  I don't know if I'll ever
        change this -- it would require changes to the .pyc file magic
        number to do it right, and a more global notion of compiler flags.
      
      - You can usefully combine -Dwarn and -Dnew: this gives the __main__
        module new division, and warns about classic division everywhere
        else.
      393661d1
  25. 30 Agu, 2001 1 kayıt (commit)
  26. 29 Agu, 2001 1 kayıt (commit)
  27. 23 Agu, 2001 1 kayıt (commit)
    • Tim Peters's avatar
      float_pow: Put *all* of the burden on the libm pow in normal · 96685bfb
      Tim Peters yazdı
      cases.
      powu:  Deleted.
      
      This started with a nonsensical error msg:
      
      >>> x = -1.
      >>> import sys
      >>> x**(-sys.maxint-1L)
      Traceback (most recent call last):
        File "<stdin>", line 1, in ?
      ValueError: negative number cannot be raised to a fractional power
      >>>
      
      The special-casing in float_pow was simply wrong in this case (there's
      not even anything peculiar about these inputs), and I don't see any point
      to it in *any* case:  a decent libm pow should have worst-case error under
      1 ULP, so in particular should deliver the exact result whenever the exact
      result is representable (else its error is at least 1 ULP).  Thus our
      special fiddling for integral values "shouldn't" buy anything in accuracy,
      and, to the contrary, repeated multiplication is less accurate than a
      decent pow when the true result isn't exactly representable.  So just
      letting pow() do its job here (we may not be able to trust libm x-platform
      in exceptional cases, but these are normal cases).
      96685bfb
  28. 17 Agu, 2001 1 kayıt (commit)
    • Martin v. Löwis's avatar
      Patch #445762: Support --disable-unicode · 339d0f72
      Martin v. Löwis yazdı
      - Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
      - check for Py_USING_UNICODE in all places that use Unicode functions
      - disables unicode literals, and the builtin functions
      - add the types.StringTypes list
      - remove Unicode literals from most tests.
      339d0f72
  29. 08 Agu, 2001 1 kayıt (commit)
    • Guido van Rossum's avatar
      Implement PEP 238 in its (almost) full glory. · 4668b000
      Guido van Rossum yazdı
      This introduces:
      
      - A new operator // that means floor division (the kind of division
        where 1/2 is 0).
      
      - The "future division" statement ("from __future__ import division)
        which changes the meaning of the / operator to implement "true
        division" (where 1/2 is 0.5).
      
      - New overloadable operators __truediv__ and __floordiv__.
      
      - New slots in the PyNumberMethods struct for true and floor division,
        new abstract APIs for them, new opcodes, and so on.
      
      I emphasize that without the future division statement, the semantics
      of / will remain unchanged until Python 3.0.
      
      Not yet implemented are warnings (default off) when / is used with int
      or long arguments.
      
      This has been on display since 7/31 as SF patch #443474.
      
      Flames to /dev/null.
      4668b000
  30. 02 Agu, 2001 1 kayıt (commit)
  31. 26 Tem, 2001 1 kayıt (commit)