Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | This has been unnecessary as long as rawNewObj has called zeroMem, (#8867) | c-blake | 2018-09-04 | 1 | -1/+0 |
| | | | | and more recently indexing past the Nim-logical end has become illegal making this line cause a crash. | ||||
* | Don't depend on string.h in codegen (#8299) | Yuriy Glukhov | 2018-07-13 | 1 | -2/+1 |
| | |||||
* | make tmemfile2 work again | Araq | 2018-07-06 | 1 | -1/+2 |
| | |||||
* | Add MemMapFileStream. Fixes in memFiles. (#7944) | Dmitry Atamanov | 2018-06-14 | 1 | -9/+109 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add MemMapFileStream * Added tests * Fixed bug in memfiles (zero index for string) * Added flush to changelog * Attempt to fix Win's nuances * Fix attempt to fix * Continue... * And again... * Reworked tests (all for win on Win) * Fixes in flush (Win) * Replace fn vars to consts * Added the attempts parameter to the flush * Replace while to for * Move to memfiles * Use Natural instead of uint * Better error messages for append mode. Handle specific cases. | ||||
* | remove deprecated stuff from the stdlib; introduce better deprecation warnings | Araq | 2018-05-05 | 1 | -2/+0 |
| | |||||
* | memfiles: better error checking for Windows; refs #6361 | Araq | 2018-01-03 | 1 | -4/+7 |
| | |||||
* | Update memfiles.nim (#6328) | Denis Rumyantsev | 2017-09-15 | 1 | -1/+1 |
| | | | FIX error in MemFile fileSize | ||||
* | Remove expr/stmt (#5857) | Arne Döring | 2017-07-25 | 1 | -3/+3 |
| | |||||
* | Fixes incorrect fd==0 test on Unix; Conserves handles by default. (#5512) | c-blake | 2017-03-12 | 1 | -8/+20 |
| | | | | | | | | | | | | | | * Fix 2 problems. First, 0 is a valid fd on Unix (easily gotten if user first closes all fds and then starts using memfiles). Use -1 instead for an invalid fd. Second, it is best practice to conserve open fds on Unix and file handles on Windows. These handles are not needed unless the user wants to remap the memory with ``mapMem`` (or a hypothetical future ``proc resize``). Adding a new bool param ``allowRemap=false`` to ``memfiles.open`` solves this cleanly in a "mostly" backward compatible way. This is only "mostly" because the default ``false`` case does not keep unneeded resources allocated, but that most sensible default means that any ``mapMem`` callers need to fix all their open calls to have allowRemap=true, as this PR also does for tmemfiles2.nim. * Include backwards compatibility note. | ||||
* | Oops - forgot export marker. | Charles Blake | 2016-12-22 | 1 | -1/+1 |
| | |||||
* | Add a proc `==` for MemSlice. | Charles Blake | 2016-12-22 | 1 | -0/+5 |
| | |||||
* | Add doco on mapMem(), extend doco on open(), and add extra lines space for ↵ | James Parkinson | 2016-08-05 | 1 | -7/+27 |
| | | | | readability | ||||
* | fix types of ansi_c/sysio to more closely match C ABI | Jacek Sieka | 2016-06-05 | 1 | -4/+2 |
| | | | | | also fixes some instances of using C library functions when there are nim alternatives available | ||||
* | Bug fix: change non-fmRead file mode to set GENERIC_READ or GENERIC_WRITE | JamesP | 2015-09-24 | 1 | -1/+2 |
| | | | | | instead of GENERIC_ALL which on 64bit windows rasied an [OSError] exception | ||||
* | change type of windows handles to Handle | JamesP | 2015-09-24 | 1 | -3/+3 |
| | |||||
* | fix wasOpened reference and set to false on close | JamesP | 2015-09-23 | 1 | -1/+2 |
| | |||||
* | Add wasOpened flag for windows, so not attempt close when unopened | JamesP | 2015-09-22 | 1 | -1/+4 |
| | |||||
* | Undo zero check | JamesP | 2015-09-22 | 1 | -1/+1 |
| | |||||
* | bug fix: close() only unmapViewOfFile() when fHandle is valid. | JamesP | 2015-09-12 | 1 | -1/+1 |
| | | | | | Added extra test on windows close so if already closed it doesn't throw an exception. | ||||
* | lib: Trim .nim files trailing whitespace | Adam Strzelecki | 2015-09-04 | 1 | -5/+5 |
| | | | | via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} + | ||||
* | Add note about what is included. | Charles Blake | 2015-08-04 | 1 | -0/+3 |
| | |||||
* | Use hyperlinks to refer to other procs. | Charles Blake | 2015-08-04 | 1 | -6/+8 |
| | |||||
* | Expand memSlices doc comment & use better example. | Charles Blake | 2015-08-04 | 1 | -14/+27 |
| | | | | Have lines() iterators docs point back to memSlices() for details. | ||||
* | Spruce up doc comments as per dom96 suggestions. | Charles Blake | 2015-08-03 | 1 | -7/+12 |
| | |||||
* | toString --> `$`. | Charles Blake | 2015-08-03 | 1 | -1/+1 |
| | |||||
* | Try to get examples to render right as HTML. | Charles Blake | 2015-08-02 | 1 | -1/+5 |
| | |||||
* | Add some example code blocks. | Charles Blake | 2015-08-02 | 1 | -2/+10 |
| | |||||
* | Quote the \ in doc comments. | Charles Blake | 2015-08-02 | 1 | -5/+5 |
| | |||||
* | Add some little one-line doc comment of MemSlice. | Charles Blake | 2015-08-02 | 1 | -1/+1 |
| | |||||
* | Add top of module comment. Re-order definitions to | Charles Blake | 2015-08-02 | 1 | -6/+36 |
| | | | | | | | | | | type, then converter, then 3 iterators lowest- to highest-level (also fastest to slowest) including a new intermediate iterator lines(MemFile, buffer) that is more like readLine(File) in case that helps anyone port code. Add doc comments. Also have toString just use newString+c_memcpy instead of currently fragile toNimStr which Araq wants a separate PR for. | ||||
* | Nix unchecked which has no semantics for objects. | Charles Blake | 2015-08-02 | 1 | -1/+1 |
| | |||||
* | cstring->pointer in MemSlice to make consistent with MemFile and | Charles Blake | 2015-07-29 | 1 | -8/+8 |
| | | | | | also to make more clear the care required to use MemSlice instances. (E.g., memXXX functions rather than strXXX functions). | ||||
* | Remove NUL termination unneeded post toNimStr fix. | Charles Blake | 2015-07-28 | 1 | -1/+0 |
| | |||||
* | Rename [rR]ecord->[mM]emSlice, rec->ms, End->ending. Also update some comments. | Charles Blake | 2015-07-26 | 1 | -20/+20 |
| | |||||
* | Beg->data, Len->size to address Varriount's issue. I was unaware of | Charles Blake | 2015-07-24 | 1 | -11/+11 |
| | | | | lower case members as a strict style convention. | ||||
* | Add MemFile text interface factored so users can optionally skip Nim string | Charles Blake | 2015-07-24 | 1 | -0/+32 |
| | | | | | | construction (e.g. to filter many lines out before building strings). Only Windows and/or Unix line endings are supported by default, though fiddling with delim/eat arguments can probably support archaic MacOS9 files. | ||||
* | lib/pure/e-o - Dropped 'T' from types | pdw | 2015-06-04 | 1 | -1/+1 |
| | |||||
* | Happy new year! | Guillaume Gelin | 2015-01-06 | 1 | -1/+1 |
| | |||||
* | Nimrod renamed to Nim | Araq | 2014-08-28 | 1 | -1/+1 |
| | |||||
* | big rename | Araq | 2014-08-28 | 1 | -2/+2 |
| | |||||
* | big rename | Araq | 2014-08-27 | 1 | -16/+17 |
| | |||||
* | renamefest | Araq | 2014-08-23 | 1 | -2/+2 |
| | |||||
* | Revert "Do not automatically use MAP_POPULATE for opening mmap files." | Nick Greenfield | 2014-07-23 | 1 | -9/+3 |
| | | | | | | | This reverts commit cba75db4e36b3af0d39b5717141a971e6d558554. The prior commit yields a compiler error 'error: lvalue required as left operand of assignment; MAP_POPULATE = ((int) 0);'. So for now this branch *always* adds MAP_POPULATE when using the open and mapMem procs. | ||||
* | Do not automatically use MAP_POPULATE for opening mmap files. | Nick Greenfield | 2014-07-23 | 1 | -3/+9 |
| | | | | | Adds use_map_populate keyword to memfiles.open and memfiles.mapMem to govern MAP_POPULATE use. This is set to false by default. | ||||
* | Add automatic MAP_POPULATE flag for opening read_only (MAP_PRIVATE) and ↵ | Nick Greenfield | 2014-07-23 | 1 | -2/+2 |
| | | | | shared (MAP_SHARED) mmap files. | ||||
* | Update posix open() call to incl. permissions | boydgreenfield | 2014-05-05 | 1 | -1/+4 |
| | | | This explicitly grants user read/write access to newly-created mmap files. Previously, on some systems files would be created but could not be re-opened as the user lacked sufficient permissions. | ||||
* | Clarify newFileSize & mappedSize params in memfiles.open() docs | boydgreenfield | 2014-05-05 | 1 | -3/+16 |
| | |||||
* | added mapMem/unmapMem to memfiles; untested | Araq | 2014-03-22 | 1 | -4/+41 |
| | |||||
* | case consistency for linux | Araq | 2013-12-29 | 1 | -7/+7 |
| | |||||
* | case consistency part 4 | Araq | 2013-12-27 | 1 | -19/+19 |
| |