1. 16 Jul, 2001 1 commit
  2. 14 May, 2001 2 commits
    • Tim Peters's avatar
      Fix new compiler warnings. Also boost "start" from (C) int to long and · d401eddf
      Tim Peters authored
      return a (C) long:  PyArg_ParseTuple and Py_BuildValue may not let us get
      at the size_t we really want, but C int is clearly too small for a 64-bit
      box, and both the start parameter and the return value should work for
      large mapped files even on 32-bit boxes.  The code really needs to be
      rethought from scratch (not by me, though ...).
      d401eddf
    • Greg Stein's avatar
      Fix the .find() method for memory maps. · 834f4dd7
      Greg Stein authored
      1) it didn't obey the "start" parameter (and when it does, we must validate
         the value)
      2) the return value needs to be an absolute index, rather than relative to
         some arbitrary point in the file
      
      (checking CVS, it appears this method never worked; these changes bring it
       into line with typical .find() behavior)
      834f4dd7
  3. 09 May, 2001 1 commit
  4. 21 Apr, 2001 1 commit
  5. 14 Jan, 2001 1 commit
  6. 10 Jan, 2001 2 commits
  7. 01 Oct, 2000 1 commit
    • Fred Drake's avatar
      my_getpagesize(): New function; returns the size of a page of memory. · 145f96eb
      Fred Drake authored
                         Versions are defined for Windows and Unix; the Unix
                         flavor uses sysconf() to get the page size; this avoids
                         the use of getpagesize(), which is deprecated and
                         requires an additional library on some platforms
                         (specifically, Reliant UNIX).
      
      This partially closes SourceForge bug #113797.
      145f96eb
  8. 25 Sep, 2000 1 commit
  9. 30 Jul, 2000 2 commits
    • Mark Hammond's avatar
      More Windows changes. · 071864ac
      Mark Hammond authored
      * After discussion with Trent, all INT_PTR references have been removed in favour of the HANDLE it should always have been.  Trent can see no 64bit issues here.
      
      * In this process, I noticed that the close operation was dangerous, in that we could end up passing bogus results to the Win32 API.  These result of the API functions passed the bogus values were never (and still are not) checked, but this is closer to "the right thing" (tm) than before.
      
      Tested on Windows and Linux.
      071864ac
    • Mark Hammond's avatar
      Fixes for Windows (but also tested on Linux). Test suite now completes, and... · 2cbed005
      Mark Hammond authored
      Fixes for Windows (but also tested on Linux).  Test suite now completes, and this module should not leak in the face of errors.
      
      Checkin that replaces the INT_PTR types with HANDLEs still TBD (but as that is a "spelling" patch, rather than a functional one, I will commit it seperately.
      2cbed005
  10. 16 Jul, 2000 1 commit
    • Thomas Wouters's avatar
      Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either · 7e474022
      Thomas Wouters authored
      comments, docstrings or error messages. I fixed two minor things in
      test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't").
      
      There is a minor style issue involved: Guido seems to have preferred English
      grammar (behaviour, honour) in a couple places. This patch changes that to
      American, which is the more prominent style in the source. I prefer English
      myself, so if English is preferred, I'd be happy to supply a patch myself ;)
      7e474022
  11. 09 Jul, 2000 1 commit
    • Fredrik Lundh's avatar
      - added (long) casts to a couple of Py_BuildValue calls, · 5cccf509
      Fredrik Lundh authored
        just for the sake of it.
      
        note that this only covers the unlikely case that size_t
        is smaller than a long; it's probably more likely that
        there are platforms out there where size_t is *larger*
        than a long, and mmapmodule cannot really deal with that
        today.
      5cccf509
  12. 08 Jul, 2000 1 commit
    • Fredrik Lundh's avatar
      -- ANSI-fying, names · 54cf3dc8
      Fredrik Lundh authored
         (patch #100762 by Peter Schneider-Kamp, minus the
          indentation changes)
      
      -- added INT_PTR workaround to make it build under VC 5.0
      54cf3dc8
  13. 05 Jul, 2000 1 commit
  14. 01 Jul, 2000 1 commit
  15. 18 Jun, 2000 4 commits
  16. 17 Jun, 2000 1 commit
  17. 03 Jun, 2000 2 commits
  18. 03 May, 2000 1 commit
    • Guido van Rossum's avatar
      Vladimir Marangozov's long-awaited malloc restructuring. · b18618da
      Guido van Rossum authored
      For more comments, read the patches@python.org archives.
      For documentation read the comments in mymalloc.h and objimpl.h.
      
      (This is not exactly what Vladimir posted to the patches list; I've
      made a few changes, and Vladimir sent me a fix in private email for a
      problem that only occurs in debug mode.  I'm also holding back on his
      change to main.c, which seems unnecessary to me.)
      b18618da
  19. 10 Apr, 2000 2 commits
  20. 05 Apr, 2000 1 commit
  21. 04 Apr, 2000 1 commit
    • Fred Drake's avatar
      Patch from Hrvoje Niksic <hniksic@iskon.hr>: · 56a87a09
      Fred Drake authored
      The bug is in mmap_read_line_method(), and its loop that searches for
      newlines.  After the loop reaches EOF, eol is incremented and points
      after the end of the memory.  This results in readline() method
      sometimes picking up and returning a byte after the end of the string.
      This is usually a bogus \0, but it could cause SIGSEGV if it's after
      the end of the page).
      
      The patch fixes the problem.  Also, it uses memchr() for finding a
      character, which is in fact the "strnchr" the comment is asking for.
      memchr() is already used in Python sources, so there should be no
      portability problems.
      56a87a09
  22. 31 Mar, 2000 2 commits
    • Guido van Rossum's avatar
      325942ad
    • Guido van Rossum's avatar
      Hacked for Win32 by Mark Hammond. · 09fdf073
      Guido van Rossum authored
      Reformatted for 8-space tabs and fitted into 80-char lines by GvR.
      
      Mark writes:
      
      * the Win32 version now accepts the same args as the Unix version.
      The win32 specific "tag" param is now optional.  The end result is
      that the exact same test suite runs on Windows (definately a worthy
      goal!).
      
      * I changed the error object.  All occurences of the error, except
      for 1, corresponds to an underlying OS error.  This one was changed
      to a ValueError (a better error for that condition), and the module
      error object is now simply EnvironmentError.  All win32 error
      routines now call the new Windows specific error handler.
      09fdf073
  23. 30 Mar, 2000 1 commit