preparations for 0.8.12

This commit is contained in:
Araq
2011-07-10 15:48:13 +02:00
parent 2565ff8dde
commit 5b96eaa953
81 changed files with 2355 additions and 826 deletions

4
lib/pure/collections/intsets.nim Normal file → Executable file
View File

@@ -9,8 +9,8 @@
## The ``intsets`` module implements an efficient int set implemented as a
## sparse bit set.
## **Note**: Since Nimrod does not allow the assignment operator to be
## overloaded, ``=`` for int sets performs some rather meaningless shallow
## **Note**: Since Nimrod currently does not allow the assignment operator to
## be overloaded, ``=`` for int sets performs some rather meaningless shallow
## copy.
import

0
lib/pure/collections/queues.nim Normal file → Executable file
View File

6
lib/pure/collections/sets.nim Normal file → Executable file
View File

@@ -9,9 +9,9 @@
## The ``sets`` module implements an efficient hash set and ordered hash set.
##
## Note: The data types declared here have *value semantics*: This means that
## ``=`` performs a copy of the hash table. If you are overly concerned with
## efficiency and know what you do (!), you can define the symbol
## **Note**: The data types declared here have *value semantics*: This means
## that ``=`` performs a copy of the hash table. If you are overly concerned
## with efficiency and know what you do (!), you can define the symbol
## ``shallowADT`` to compile a version that uses shallow copies instead.
import

8
lib/pure/collections/tables.nim Normal file → Executable file
View File

@@ -10,9 +10,9 @@
## The ``tables`` module implements an efficient hash table that is
## a mapping from keys to values.
##
## Note: The data types declared here have *value semantics*: This means that
## ``=`` performs a copy of the hash table. If you are overly concerned with
## efficiency and know what you do (!), you can define the symbol
## **Note:** The data types declared here have *value semantics*: This means
## that ``=`` performs a copy of the hash table. If you are overly concerned
## with efficiency and know what you do (!), you can define the symbol
## ``shallowADT`` to compile a version that uses shallow copies instead.
import
@@ -27,7 +27,7 @@ type
TSlotEnum = enum seEmpty, seFilled, seDeleted
TKeyValuePair[A, B] = tuple[slot: TSlotEnum, key: A, val: B]
TKeyValuePairSeq[A, B] = seq[TKeyValuePair[A, B]]
TTable* {.final, myShallow.}[A, B] = object
TTable* {.final, myShallow.}[A, B] = object ## generic hash table
data: TKeyValuePairSeq[A, B]
counter: int

View File

@@ -366,10 +366,12 @@ when defined(Windows) and not defined(useNimRtl):
result.id = procInfo.dwProcessID
proc close(p: PProcess) =
discard CloseHandle(p.inputHandle)
discard CloseHandle(p.outputHandle)
discard CloseHandle(p.errorHandle)
discard CloseHandle(p.FProcessHandle)
when false:
# somehow this does not work on Windows:
discard CloseHandle(p.inputHandle)
discard CloseHandle(p.outputHandle)
discard CloseHandle(p.errorHandle)
discard CloseHandle(p.FProcessHandle)
proc suspend(p: PProcess) =
discard SuspendThread(p.FProcessHandle)

0
lib/pure/redis.nim Normal file → Executable file
View File

0
lib/pure/romans.nim Normal file → Executable file
View File

View File

@@ -168,6 +168,7 @@ proc createMessage*(mSubject, mBody: string, mTo,
result.msgOtherHeaders = newStringTable()
proc `$`*(msg: TMessage): string =
## stringify for ``TMessage``.
result = ""
if msg.msgTo.len() > 0:
result = "TO: " & msg.msgTo.join(", ") & "\c\L"