From 7fa399f51c39e6661876223009d5003cd2e0cf99 Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 15 Jul 2014 09:30:51 +0200 Subject: git forced me to commit these --- lib/pure/unidecode/gen.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 lib/pure/unidecode/gen.py (limited to 'lib/pure') diff --git a/lib/pure/unidecode/gen.py b/lib/pure/unidecode/gen.py old mode 100755 new mode 100644 -- cgit 1.4.1-2-gfad0 From a3441b3db58dd021fa6f34ae3a72f73c5e9b7e37 Mon Sep 17 00:00:00 2001 From: dumndummer Date: Tue, 27 Jan 2015 12:04:07 +0000 Subject: Update sets.nim corrected misspelled word in doc comment --- lib/pure/collections/sets.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/pure') diff --git a/lib/pure/collections/sets.nim b/lib/pure/collections/sets.nim index 92ef3152d..8af0b3118 100644 --- a/lib/pure/collections/sets.nim +++ b/lib/pure/collections/sets.nim @@ -253,7 +253,7 @@ proc containsOrIncl*[A](s: var HashSet[A], key: A): bool = proc init*[A](s: var HashSet[A], initialSize=64) = ## Initializes a hash set. ## - ## The `initialSize` parameter needs to be a power of too. You can use + ## The `initialSize` parameter needs to be a power of two. You can use ## `math.nextPowerOfTwo() `_ to guarantee that at ## runtime. All set variables have to be initialized before you can use them ## with other procs from this module with the exception of `isValid() -- cgit 1.4.1-2-gfad0 From c7543652e67aea77dcda3a67c48efb9f76488140 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Tue, 27 Jan 2015 12:48:48 +0000 Subject: Revert "Update sets.nim" --- lib/pure/collections/sets.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/pure') diff --git a/lib/pure/collections/sets.nim b/lib/pure/collections/sets.nim index 8af0b3118..92ef3152d 100644 --- a/lib/pure/collections/sets.nim +++ b/lib/pure/collections/sets.nim @@ -253,7 +253,7 @@ proc containsOrIncl*[A](s: var HashSet[A], key: A): bool = proc init*[A](s: var HashSet[A], initialSize=64) = ## Initializes a hash set. ## - ## The `initialSize` parameter needs to be a power of two. You can use + ## The `initialSize` parameter needs to be a power of too. You can use ## `math.nextPowerOfTwo() `_ to guarantee that at ## runtime. All set variables have to be initialized before you can use them ## with other procs from this module with the exception of `isValid() -- cgit 1.4.1-2-gfad0 From 344df154dcc4363a975f80cc78e3c4531f3a926b Mon Sep 17 00:00:00 2001 From: Fabio Cevasco Date: Fri, 6 Feb 2015 21:47:05 +0100 Subject: newRollingFileLogger - fmtStr is always set to defaultFmtStr --- lib/pure/logging.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/pure') diff --git a/lib/pure/logging.nim b/lib/pure/logging.nim index 9247f69c5..82e1025bb 100644 --- a/lib/pure/logging.nim +++ b/lib/pure/logging.nim @@ -183,7 +183,7 @@ proc newRollingFileLogger*(filename = defaultFilename(), ## a new log file will be started and the old will be renamed. new(result) result.levelThreshold = levelThreshold - result.fmtStr = defaultFmtStr + result.fmtStr = fmtStr result.maxLines = maxLines result.f = open(filename, mode) result.curLine = 0 -- cgit 1.4.1-2-gfad0 From 335c3e2b819bf3e190869dc432a9809c004557f1 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Fri, 6 Feb 2015 21:30:45 +0000 Subject: Revert "newRollingFileLogger - fmtStr is always set to defaultFmtStr" --- lib/pure/logging.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/pure') diff --git a/lib/pure/logging.nim b/lib/pure/logging.nim index 82e1025bb..9247f69c5 100644 --- a/lib/pure/logging.nim +++ b/lib/pure/logging.nim @@ -183,7 +183,7 @@ proc newRollingFileLogger*(filename = defaultFilename(), ## a new log file will be started and the old will be renamed. new(result) result.levelThreshold = levelThreshold - result.fmtStr = fmtStr + result.fmtStr = defaultFmtStr result.maxLines = maxLines result.f = open(filename, mode) result.curLine = 0 -- cgit 1.4.1-2-gfad0 From cee08adebbe70614d7bd875cfe2211e31fca71a7 Mon Sep 17 00:00:00 2001 From: apense Date: Fri, 17 Apr 2015 13:14:36 -0400 Subject: Corrected code example in pegs The code as `"var1=key; var2=key2".replacef(peg"{\ident}'='{\ident}", "$1<-$2$2")` just results in `$1<-$2$2; $1<-$2$2` --- lib/pure/pegs.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/pure') diff --git a/lib/pure/pegs.nim b/lib/pure/pegs.nim index 7cef0a00d..53b09a706 100644 --- a/lib/pure/pegs.nim +++ b/lib/pure/pegs.nim @@ -902,7 +902,7 @@ proc replacef*(s: string, sub: Peg, by: string): string {. ## with the notation ``$i`` and ``$#`` (see strutils.`%`). Examples: ## ## .. code-block:: nim - ## "var1=key; var2=key2".replace(peg"{\ident}'='{\ident}", "$1<-$2$2") + ## "var1=key; var2=key2".replacef(peg"{\ident}'='{\ident}", "$1<-$2$2") ## ## Results in: ## -- cgit 1.4.1-2-gfad0 From 3caa7ff08c761cce6c68db19137dcbbe66c7cdbf Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 17 Apr 2015 22:09:02 +0200 Subject: Revert "Corrected code example in pegs" --- lib/pure/pegs.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/pure') diff --git a/lib/pure/pegs.nim b/lib/pure/pegs.nim index 53b09a706..7cef0a00d 100644 --- a/lib/pure/pegs.nim +++ b/lib/pure/pegs.nim @@ -902,7 +902,7 @@ proc replacef*(s: string, sub: Peg, by: string): string {. ## with the notation ``$i`` and ``$#`` (see strutils.`%`). Examples: ## ## .. code-block:: nim - ## "var1=key; var2=key2".replacef(peg"{\ident}'='{\ident}", "$1<-$2$2") + ## "var1=key; var2=key2".replace(peg"{\ident}'='{\ident}", "$1<-$2$2") ## ## Results in: ## -- cgit 1.4.1-2-gfad0 From 47f6d38b67a794e6dbe7bc612fe682d43b0d0f18 Mon Sep 17 00:00:00 2001 From: Michael Werner Date: Thu, 7 May 2015 22:39:15 +0200 Subject: fixed typo in threadpool.nim --- lib/pure/concurrency/threadpool.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/pure') diff --git a/lib/pure/concurrency/threadpool.nim b/lib/pure/concurrency/threadpool.nim index 9f1e53fb8..a431691ad 100644 --- a/lib/pure/concurrency/threadpool.nim +++ b/lib/pure/concurrency/threadpool.nim @@ -300,7 +300,7 @@ proc setMinPoolSize*(size: range[1..MaxThreadPoolSize]) = minPoolSize = size proc setMaxPoolSize*(size: range[1..MaxThreadPoolSize]) = - ## sets the minimal thread pool size. The default value of this + ## sets the maximal thread pool size. The default value of this ## is ``MaxThreadPoolSize``. maxPoolSize = size if currentPoolSize > maxPoolSize: -- cgit 1.4.1-2-gfad0 From 50a6b49bf91601a64f8d28e61a9adb9c3f2a002d Mon Sep 17 00:00:00 2001 From: jonathonf Date: Sat, 1 Aug 2015 20:45:58 +0100 Subject: Set correct Host in request header Ensure the correct destination hostname is used in the request, otherwise the request will fail in one of a number of interesting ways when using a proxy. Fixes https://github.com/nim-lang/Nim/issues/3166 --- lib/pure/httpclient.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/pure') diff --git a/lib/pure/httpclient.nim b/lib/pure/httpclient.nim index 9c27ecdab..c646061c9 100644 --- a/lib/pure/httpclient.nim +++ b/lib/pure/httpclient.nim @@ -402,7 +402,7 @@ proc request*(url: string, httpMethod: string, extraHeaders = "", headers.add(" HTTP/1.1\c\L") - add(headers, "Host: " & r.hostname & "\c\L") + add(headers, "Host: " & parseUri(url).hostname & "\c\L") if userAgent != "": add(headers, "User-Agent: " & userAgent & "\c\L") if proxy != nil and proxy.auth != "": -- cgit 1.4.1-2-gfad0 From 3b1ca2af4e51b337bf407b3d8090175585f8d41e Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Sat, 1 Aug 2015 20:48:23 +0100 Subject: Revert "Set correct Host in request header" --- lib/pure/httpclient.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/pure') diff --git a/lib/pure/httpclient.nim b/lib/pure/httpclient.nim index c646061c9..9c27ecdab 100644 --- a/lib/pure/httpclient.nim +++ b/lib/pure/httpclient.nim @@ -402,7 +402,7 @@ proc request*(url: string, httpMethod: string, extraHeaders = "", headers.add(" HTTP/1.1\c\L") - add(headers, "Host: " & parseUri(url).hostname & "\c\L") + add(headers, "Host: " & r.hostname & "\c\L") if userAgent != "": add(headers, "User-Agent: " & userAgent & "\c\L") if proxy != nil and proxy.auth != "": -- cgit 1.4.1-2-gfad0 From d1bb246c20ac08c47dafa0eab7a9a9856f5ac163 Mon Sep 17 00:00:00 2001 From: Federico Ceratto Date: Fri, 23 Oct 2015 17:35:55 +0100 Subject: Replace "prefix" with "suffix" in endsWith doc --- lib/pure/pegs.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/pure') diff --git a/lib/pure/pegs.nim b/lib/pure/pegs.nim index 39f0bfa95..54d7ef761 100644 --- a/lib/pure/pegs.nim +++ b/lib/pure/pegs.nim @@ -886,7 +886,7 @@ proc startsWith*(s: string, prefix: Peg, start = 0): bool {. proc endsWith*(s: string, suffix: Peg, start = 0): bool {. nosideEffect, rtl, extern: "npegs$1".} = - ## returns true if `s` ends with the pattern `prefix` + ## returns true if `s` ends with the pattern `suffix` var c: Captures c.origStart = start for i in start .. s.len-1: -- cgit 1.4.1-2-gfad0