Commit Graph

6124 Commits

Author SHA1 Message Date
skilchen
57f4a5d429 sequtils: remove some aligning spaces around == to silence warnings 2018-07-21 19:16:05 +02:00
Dominik Picheta
5ea3b4d581 Implements alloc/dealloc counters for better leak debugging. (#8384) 2018-07-21 01:43:13 +02:00
andri lim
9c3336dcff fixes #8371, macros.hasCustomPragma doesn't crash anymore (#8378)
* fixes #8371, macros.hasCustomPragma doesn't crash anymore

* fix macros.hasCustomPragma
2018-07-20 19:48:12 +02:00
Ray Imber
060871e64a Better doc search (#8260)
* Modified the doc generation to produce a custom data attribute to allow for better search functionality

* Implemented fuzzy matching for the Nim Doc search instead of the simple regex match.

* Fix to the WordBoundry state transition from code review with @Varriount. Also removed silly testing template that is no longer used.

* Update fuzzysearch.nim

* Update fuzzysearch.nim

* Update fuzzysearch.nim

* Update dochack.nim

* Update dochack.nim
2018-07-20 04:58:42 -05:00
andri lim
f92d61b1f4 fixes #8037, json.to support object with distinct types (#8086)
* add distinct types to json 'to' macro

* fix json 'to' macro and add more test
2018-07-19 16:38:40 +01:00
Andreas Rumpf
ae09879b3a fixes #8223 2018-07-17 18:21:09 +02:00
Andreas Rumpf
59a5c0462f fixes #8338 2018-07-17 15:49:55 +02:00
John Novak
692d1da95d Fix setCursorPos and setCursorXPos on POSIX (#8310) 2018-07-17 11:35:26 +02:00
Jeff Ciesielski
f8723cd1e3 Add extended baud rates to posix/termios (#8322)
115200 is really common.  I'd like to get support in nimserial, but
I'm guessing it would help to have support in the stdlib first.
2018-07-16 15:15:47 -04:00
Timothee Cour
2ac22b4cf0 fix #8273 times format regression, and fix inconsistent ordering in 1 format overload (#8290)
* Fix issue #8273 [regression] [times.format] Error: attempting to call
undeclared routine: 'format'

* rename format to f for consistency with other overloads and avoid
similar bugs as #8273

* breaking change since PR 8094: changed format*(f: TimeFormat, dt: DateTime) to format*(dt: DateTime, f: TimeFormat) for consistency w other overloads

* use consistent ordering for times.parse procs
2018-07-16 21:15:17 +02:00
momf
dd47013017 add SSL_set_SSL_CTX for SNI(Server Name Indication) (#8308)
* add SSL_set_SSL_CTX for SNI

* fix SSL_set_SSL_CTX
2018-07-13 17:09:22 +01:00
Yuriy Glukhov
dfe3f16022 Don't depend on string.h in codegen (#8299) 2018-07-13 17:41:59 +02:00
Timothee Cour
40f44a0c16 fix issue #8251 ospaths.isAbsolute: out of bound errors (#8291)
* fix issue #8251 ospaths.isAbsolute: out of bound errors

* address comments

* add reference to a spec for quirky macos paths
2018-07-13 03:54:48 -04:00
LemonBoy
3163a0f466 Do not consider enums with holes as ordinals (#8264)
Make the compiler behave consistently with respect to what's written in
the manual.

Fixes #1239
2018-07-12 18:08:45 +02:00
Eugene Kabanov
3fec2ba5e5 Fix terminal.nim to be GCSAFE. (#8296)
* Also fix deprecated callsite().
2018-07-12 18:06:15 +02:00
Joey Yakimowich-Payne
9aad193d27 Fix undefined PObject reference 2018-07-12 11:54:25 +01:00
Kaushal Modi
1102f9aaf1 Make the Style enum a proper Ordinal (no holes) (#8282)
The Style enum needs to be an Ordinal so that it can be used in sets.
2018-07-12 11:30:51 +02:00
Quelklef
ac3c4a94ad Fixed $ on None[T] for T with .name (#8293) 2018-07-12 11:01:48 +02:00
Timothee Cour
25bf0d1683 add os.absolutePath; fixes #8174 (#8213)
* add os.absolutePath

* fixup

* fixup

* Fixes absolutePath error message.
2018-07-10 20:31:13 +01:00
Dominik Picheta
f805018461 Fixes #5880. (#7229) 2018-07-10 00:33:31 +02:00
Oscar Nihlgård
3b310e91cd New implementations of times.parse & times.format (#8094) 2018-07-09 20:04:25 +02:00
cooldome
dec97924a4 Custom pragmas in proc types (#8205) 2018-07-09 12:11:03 +02:00
genotrance
c115090f6e Testament should run tests with no action (#8232)
* Testament should run tests with no action

* Fix strutils tests for JS
2018-07-08 20:38:46 -04:00
Timothee Cour
befca425c4 workaround issue #8223 nim doc fails with doAssertRaises (#8245) 2018-07-08 08:16:13 +02:00
Dmitry Atamanov
a6c3bbf01a Add proc toOpenArray[byte] for strings (#7820) 2018-07-07 21:03:22 +02:00
Mamy Ratsimbazafy
75ef90da82 Put back deprecation path for SomeReal
was wrongly deleted in c7298561c1
2018-07-07 15:04:41 +02:00
Dominik Picheta
53ce58f050 Merge pull request #6587 from FedericoCeratto/normalizePath
Add normalizePath and tests
2018-07-07 10:12:07 +01:00
Araq
8667899d53 hotfix: fixes possible out of bounds access in ospaths.joinPath 2018-07-07 02:31:43 +02:00
Federico Ceratto
d65429d857 Add normalizePath and tests 2018-07-06 20:21:39 +01:00
Araq
531013727d system.nim: minor code style change 2018-07-06 19:13:54 +02:00
Araq
5384de685f Merge branch 'devel' of github.com:nim-lang/Nim into araq-devel 2018-07-06 18:41:00 +02:00
Dominik Picheta
5e338c371e Use '\L' instead of '\n' in system for backwards compatibility.
See https://github.com/nim-lang/packages/pull/785.
2018-07-06 15:48:17 +01:00
Araq
8bcaee1fdf make tmemfile2 work again 2018-07-06 15:53:32 +02:00
Joey
a1457bfa9f Rewrite the memory management code for Nintendo Switch (#8169)
Rewrite the memory management code for Nintendo Switch

The first implementation was naive and did not account for multiple
memory allocations. However, this implementation may still be
incomplete. Currently, when running applications, the code runs fine.
When the application is exited via code (the end of the program is
reached or quit() is called), the Switch will crash. Not sure why this
happens, but I suspect it is from Nim memory allocations.

I suspect the memory allocations because when I compile the helloworld
application without any Nim allocations (just C function calls) and use
`--gc:none` as a compile option, the application exits fine.
2018-07-05 16:33:15 +02:00
Andreas Rumpf
683c60e2fd restore deprecated PNimrodNode in order to make the CIs happy 2018-07-05 09:17:44 +02:00
Andreas Rumpf
86a7054c88 Merge branch 'devel' into araq-devel 2018-07-04 19:25:53 +02:00
Timothee Cour
426e5c2d1f simplify typetraits.nim test (#8193) 2018-07-03 12:19:46 +02:00
Vindaar
681d8e0749 Deprecate 'c', 'C' prefix for octal literals, fixes #8082 (#8178)
* deprecate `0c`, `0C` prefix for octal literals

Deprecates the previously allowed syntax of `0c` and `0C` as a prefix for
octal literals to bring the literals in line with the behavior of
`parseOct` from parseutils.

* add `msgKind` arg to `lexMessageLitNum` for deprecation messages

* change literal tests to check all valid integer literals

Also adds the `tinvaligintegerlit3` test to test for the (still)
invalid `0O` prefix.
2018-07-03 01:56:36 +02:00
zargot
e63369f2b9 asyncftpclient: add missing file.close to retrFile 2018-07-02 18:07:24 +02:00
Tomohiro
c79f488027 Fix os.unixToNativePath proc returns wrong result(#8179) (#8181)
* Fix os.unixToNativePath proc returns wrong result(#8179)

* Add tests for unixToNativePath
2018-07-02 17:14:26 +02:00
Tomohiro
a2b2bc1a36 Fixed #8173 (#8175) 2018-07-02 00:46:56 +02:00
Andreas Rumpf
e455023902 Merge branch 'devel' into araq-devel 2018-07-01 16:24:56 +02:00
Andreas Rumpf
67c7e49e2a gc_common: minor reformating 2018-07-01 15:10:18 +02:00
Oscar Nihlgård
b61e69202b Unexport times.stringifyUnit (#8168) 2018-07-01 12:54:13 +02:00
Timothee Cour
fbd9f9da95 execCmdEx stderr redirection (#8162) 2018-07-01 04:38:15 -04:00
Oscar Nihlgård
7674df0dff Fixes #8100 (#8101) 2018-06-29 14:53:09 +02:00
Andreas Rumpf
b5a96d28c7 codgen refactoring: prepare for alternative string/seq implementations 2018-06-29 11:34:39 +02:00
Andreas Rumpf
a9e96888d0 system.nim: cleanup the formatting 2018-06-29 11:21:57 +02:00
Timothee Cour
4deda6b732 Update nre.nim (#8147) 2018-06-29 02:13:49 -04:00
Andreas Rumpf
c7298561c1 system.nim: remove deprecated symbols 2018-06-28 07:42:46 +02:00