home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tkibin04.zip / MEMERROR < prev    next >
Text File  |  1998-09-02  |  682b  |  15 lines

  1.  
  2. This file contains information on a memory error that occurs in the OS/2
  3. version of the Python interpreter.
  4.  
  5. The Visual Age malloc() function returns NULL if it is asked to allocate a
  6. block of size 0.  To deal with this, it is necessary to add the following
  7. line to the "config.h" in the PC/os2vacpp directory of the python source tree:
  8.  
  9. #define MALLOC_ZERO_RETURNS_NULL 1
  10.  
  11. The lack of this will cause a MemoryError in certain operations, including
  12. copying an empty dictionary (something that the Tkinter code does quite
  13. frequently).  To find out if your distribution has this problem, type
  14. "{}.copy()" into the interpreter.  If you get a memory error, then it does.
  15.