1. 07 Aug, 2001 1 commit
  2. 26 Jul, 2001 2 commits
  3. 14 May, 2001 1 commit
  4. 22 Jan, 2001 1 commit
  5. 21 Jan, 2001 1 commit
  6. 18 Jan, 2001 1 commit
  7. 12 Jan, 2001 1 commit
  8. 05 Oct, 2000 2 commits
  9. 26 Sep, 2000 1 commit
  10. 10 Sep, 2000 1 commit
    • Tim Peters's avatar
      Close SF bug 110826: a complaint about the way Python #define'd NULL. · 4826a894
      Tim Peters authored
      It's hard to sort out what the bug was, exactly.  So, Big Hammer:
      
      1. Python shouldn't be in the business of #define'ing NULL, period.
      2. Users of the Python C API shouldn't be in the business of not including
         Python.h, period.
      
      Hence:
      
      1. Removed all #define's of NULL in Python source code (pyport.h and
         object.h).
      2. Since we're *relying* on stdio.h defining NULL, put an #error in
         Python.h after its #include of stdio.h if NULL isn't defined then.
      4826a894
  11. 08 Sep, 2000 2 commits
  12. 01 Sep, 2000 1 commit
  13. 18 Aug, 2000 1 commit
    • Barry Warsaw's avatar
      Moved LONG_LONG #define from longobject.h to here, since it's needed · fd847b23
      Barry Warsaw authored
      by the following.
      
      typedef in a portable way the Python name for the C9X uintptr_t type.
      This latter is the most portable way to spell an integral type to
      which a void* can be cast to and back again without losing
      information.  Parallel checkin hacks configure to check if the
      platform/compiler supports the C9X name.
      fd847b23
  14. 15 Aug, 2000 1 commit
    • Tim Peters's avatar
      Fix for http://sourceforge.net/bugs/?func=detailbug&bug_id=111866&group_id=5470. · 39dce293
      Tim Peters authored
      This was a misleading bug -- the true "bug" was that hash(x) gave an error
      return when x is an infinity.  Fixed that.  Added new Py_IS_INFINITY macro to
      pyport.h.  Rearranged code to reduce growing duplication in hashing of float and
      complex numbers, pushing Trent's earlier stab at that to a logical conclusion.
      Fixed exceedingly rare bug where hashing of floats could return -1 even if there
      wasn't an error (didn't waste time trying to construct a test case, it was simply
      obvious from the code that it *could* happen).  Improved complex hash so that
      hash(complex(x, y)) doesn't systematically equal hash(complex(y, x)) anymore.
      39dce293
  15. 11 Aug, 2000 1 commit
  16. 10 Aug, 2000 1 commit
  17. 01 Aug, 2000 2 commits
  18. 31 Jul, 2000 2 commits
  19. 26 Jul, 2000 1 commit
  20. 24 Jul, 2000 1 commit
    • Thomas Wouters's avatar
      Create a new section of pyport.h to hold all external function declarations · 1e0c2f4b
      Thomas Wouters authored
      for systems that are missing those declarations from system include files.
      Start by moving a pointy-haired ones from their previous locations to the
      new section.
      
      (The gethostname() one, for instance, breaks on several systems, because
      some define it as (char *, size_t) and some as (char *, int).)
      
      I purposely decided not to include the summary of used #defines like Tim did
      in the first section of pyport.h. In my opinion, the number of #defines
      likedly to be used by this section would make such an overview unwieldy. I
      would suggest documenting the non-obvious ones, though.
      1e0c2f4b
  21. 23 Jul, 2000 3 commits
    • Tim Peters's avatar
      Removed all instances of RETSIGTYPE from the source code: signal · 4f1b2081
      Tim Peters authored
      handlers "return void", according to ANSI C.
      Removed the new Py_RETURN_FROM_SIGNAL_HANDLER macro.
      Left RETSIGTYPE in the config stuff, because it's not clear to
      me that others aren't relying on it (e.g., extension modules).
      4f1b2081
    • Tim Peters's avatar
      Included assert.h in Python.h -- it's absurd that this basic tool of · 8315ea57
      Tim Peters authored
      good C practice hasn't been available to everything all along.
      Added Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) macro to pyport.h; this
      just casts VALUE from type WIDE to type NARROW, but assert-fails if
      Py_DEBUG is defined and info is lost due to casting.
      Replaced a line in Fredrik's fix to marshal.c to use the new macro.
      8315ea57
    • Tim Peters's avatar
      Recent ANSIfication introduced a couple instances of · 1be46844
      Tim Peters authored
          #if RETSIGTYPE != void
      That isn't C, and MSVC properly refuses to compile it.
      Introduced new Py_RETURN_FROM_SIGNAL_HANDLER macro in pyport.h
      to expand to the correct thing based on RETSIGTYPE.  However,
      only void is ANSI!  Do we still have platforms that return int?
      The Unix config mess appears to #define RETSIGTYPE by magic
      without being asked to, so I assume it's "a problem" across
      Unices still.
      1be46844
  22. 10 Jul, 2000 1 commit
  23. 08 Jul, 2000 1 commit
    • Tim Peters's avatar
      Cray J90 fixes for long ints. · 7d3a511a
      Tim Peters authored
      This was a convenient excuse to create the pyport.h file recently
      discussed!
      Please use new Py_ARITHMETIC_RIGHT_SHIFT when right-shifting a
      signed int and you *need* sign-extension.  This is #define'd in
      pyport.h, keying off new config symbol SIGNED_RIGHT_SHIFT_ZERO_FILLS.
      If you're running on a platform that needs that symbol #define'd,
      the std tests never would have worked for you (in particular,
      at least test_long would have failed).
      The autoconfig stuff got added to Python after my Unix days, so
      I don't know how that works.  Would someone please look into doing
      & testing an auto-config of the SIGNED_RIGHT_SHIFT_ZERO_FILLS
      symbol?  It needs to be defined if & only if, e.g., (-1) >> 3 is
      not -1.
      7d3a511a