1. 01 Mar, 2006 1 kayıt (commit)
  2. 27 Şub, 2006 1 kayıt (commit)
  3. 15 Şub, 2006 1 kayıt (commit)
  4. 08 Ock, 2006 1 kayıt (commit)
  5. 10 Ara, 2005 1 kayıt (commit)
    • Jeremy Hylton's avatar
      Add const to several API functions that take char *. · af68c874
      Jeremy Hylton yazdı
      In C++, it's an error to pass a string literal to a char* function
      without a const_cast().  Rather than require every C++ extension
      module to put a cast around string literals, fix the API to state the
      const-ness.
      
      I focused on parts of the API where people usually pass literals:
      PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type
      slots, etc.  Predictably, there were a large set of functions that
      needed to be fixed as a result of these changes.  The most pervasive
      change was to make the keyword args list passed to
      PyArg_ParseTupleAndKewords() to be a const char *kwlist[].
      
      One cast was required as a result of the changes:  A type object
      mallocs the memory for its tp_doc slot and later frees it.
      PyTypeObject says that tp_doc is const char *; but if the type was
      created by type_new(), we know it is safe to cast to char *.
      af68c874
  6. 05 Ara, 2005 1 kayıt (commit)
    • Michael W. Hudson's avatar
      Fix bug · b78a5fc0
      Michael W. Hudson yazdı
      [ 1346144 ] Segfaults from unaligned loads in floatobject.c
      
      by using memcpy and not just blinding casting char* to double*.
      
      Thanks to Rune Holm for the report.
      b78a5fc0
  7. 30 Haz, 2005 1 kayıt (commit)
  8. 27 May, 2005 1 kayıt (commit)
    • Michael W. Hudson's avatar
      This is my patch: · ba283e2b
      Michael W. Hudson yazdı
      [ 1181301 ] make float packing copy bytes when they can
      
      which hasn't been reviewed, despite numerous threats to check it in
      anyway if noone reviews it.  Please read the diff on the checkin list,
      at least!
      
      The basic idea is to examine the bytes of some 'probe values' to see if
      the current platform is a IEEE 754-ish platform, and if so
      _PyFloat_{Pack,Unpack}{4,8} just copy bytes around.
      
      The rest is hair for testing, and tests.
      ba283e2b
  9. 26 Nis, 2005 1 kayıt (commit)
  10. 23 Eyl, 2004 2 kayıt (commit)
    • Tim Peters's avatar
      float_richcompare(): Use the new Py_IS_NAN macro to ensure that, on · e1c69b3f
      Tim Peters yazdı
      platforms where that macro works, NaN compared to an int or long works
      the same as NaN compared to a finite float.
      e1c69b3f
    • Tim Peters's avatar
      SF bug #513866: Float/long comparison anomaly. · 307fa781
      Tim Peters yazdı
      When an integer is compared to a float now, the int isn't coerced to float.
      This avoids spurious overflow exceptions and insane results.  This should
      compute correct results, without raising spurious exceptions, in all cases
      now -- although I expect that what happens when an int/long is compared to
      a NaN is still a platform accident.
      
      Note that we had potential problems here even with "short" ints, on boxes
      where sizeof(long)==8.  There's #ifdef'ed code here to handle that, but
      I can't test it as intended.  I tested it by changing the #ifdef to
      trigger on my 32-bit box instead.
      
      I suppose this is a bugfix candidate, but I won't backport it.  It's
      long-winded (for speed) and messy (because the problem is messy).  Note
      that this also depends on a previous 2.4 patch that introduced
      _Py_SwappedOp[] as an extern.
      307fa781
  11. 08 Tem, 2004 1 kayıt (commit)
  12. 08 Haz, 2004 1 kayıt (commit)
  13. 26 May, 2004 1 kayıt (commit)
  14. 26 Şub, 2004 2 kayıt (commit)
  15. 19 Şub, 2004 1 kayıt (commit)
  16. 17 Ock, 2004 1 kayıt (commit)
  17. 20 Kas, 2003 1 kayıt (commit)
  18. 28 Haz, 2003 1 kayıt (commit)
  19. 24 May, 2003 1 kayıt (commit)
    • Tim Peters's avatar
      SF bug 705231: Assertion failed, python aborts. · e87568dd
      Tim Peters yazdı
      float_pow():  Don't let the platform pow() raise -1.0 to an integer power
      anymore; at least glibc gets it wrong in some cases.  Note that
      math.pow() will continue to deliver wrong (but platform-native) results
      in such cases.
      e87568dd
  20. 21 Mar, 2003 1 kayıt (commit)
  21. 20 Mar, 2003 1 kayıt (commit)
  22. 29 Ock, 2003 1 kayıt (commit)
  23. 28 Ock, 2003 1 kayıt (commit)
  24. 21 Kas, 2002 1 kayıt (commit)
  25. 19 Kas, 2002 1 kayıt (commit)
  26. 18 Kas, 2002 1 kayıt (commit)
  27. 19 Agu, 2002 1 kayıt (commit)
  28. 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
  29. 13 Haz, 2002 1 kayıt (commit)
  30. 02 May, 2002 1 kayıt (commit)
  31. 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
  32. 11 Ara, 2001 2 kayıt (commit)
  33. 28 Kas, 2001 2 kayıt (commit)
  34. 01 Kas, 2001 3 kayıt (commit)