mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-31 10:22:15 +00:00
Merge branch 'master' of git@github.com:Araq/Nimrod
This commit is contained in:
@@ -189,6 +189,6 @@ Real world example
|
||||
The installers for the Nimrod compiler itself are generated by niminst. Have a
|
||||
look at its configuration file:
|
||||
|
||||
.. include:: rod/nimrod.ini
|
||||
.. include:: compiler/nimrod.ini
|
||||
:literal:
|
||||
|
||||
|
||||
2448
doc/theindex.txt
2448
doc/theindex.txt
File diff suppressed because it is too large
Load Diff
@@ -471,7 +471,8 @@ elif not defined(useNimRtl):
|
||||
p_stdin, p_stdout, p_stderr: array [0..1, cint]
|
||||
new(result)
|
||||
result.exitCode = -3 # for ``waitForExit``
|
||||
if pipe(p_stdin) != 0'i32 or pipe(p_stdout) != 0'i32:
|
||||
if pipe(p_stdin) != 0'i32 or pipe(p_stdout) != 0'i32 or
|
||||
pipe(p_stderr) != 0'i32:
|
||||
OSError("failed to create a pipe")
|
||||
var Pid = fork()
|
||||
if Pid < 0:
|
||||
@@ -484,9 +485,9 @@ elif not defined(useNimRtl):
|
||||
discard close(p_stdout[readIdx])
|
||||
if dup2(p_stdout[writeIdx], writeIdx) < 0: OSError()
|
||||
if poStdErrToStdOut in options:
|
||||
discard close(p_stderr[readIdx])
|
||||
if dup2(p_stdout[writeIdx], 2) < 0: OSError()
|
||||
else:
|
||||
if pipe(p_stderr) != 0'i32: OSError("failed to create a pipe")
|
||||
discard close(p_stderr[readIdx])
|
||||
if dup2(p_stderr[writeIdx], 2) < 0: OSError()
|
||||
|
||||
|
||||
@@ -846,6 +846,19 @@ proc slaveof*(r: TRedis, host: string, port: string) =
|
||||
r.sendCommand("SLAVEOF", host, port)
|
||||
raiseNoOK(r.parseStatus())
|
||||
|
||||
iterator hPairs*(r: TRedis, key: string): tuple[key, value: string] =
|
||||
## Iterator for keys and values in a hash.
|
||||
var
|
||||
contents = r.hGetAll(key)
|
||||
k = ""
|
||||
for i in items(contents):
|
||||
if k == "":
|
||||
k = i
|
||||
else:
|
||||
yield (k, i)
|
||||
k = ""
|
||||
|
||||
|
||||
when false:
|
||||
# sorry, deactivated for the test suite
|
||||
var r = open()
|
||||
|
||||
@@ -33,7 +33,7 @@ srcdoc: "pure/parsecfg;pure/parsexml;pure/parsecsv;pure/parsesql"
|
||||
srcdoc: "pure/streams;pure/terminal;pure/cgi;impure/web;pure/unicode"
|
||||
srcdoc: "impure/zipfiles;pure/xmlgen;pure/parseutils;pure/browsers"
|
||||
srcdoc: "impure/db_postgres;impure/db_mysql;impure/db_sqlite"
|
||||
srcdoc: "pure/httpserver;pure/httpclient;pure/stmp;impure/ssl"
|
||||
srcdoc: "pure/httpserver;pure/httpclient;pure/smtp;impure/ssl"
|
||||
srcdoc: "pure/ropes;pure/unidecode/unidecode;pure/xmldom;pure/xmldomparser"
|
||||
srcdoc: "pure/xmlparser;pure/htmlparser;pure/xmltree;pure/colors"
|
||||
srcdoc: "pure/json;pure/base64;pure/scgi;impure/graphics"
|
||||
|
||||
Reference in New Issue
Block a user