Commit Graph

8623 Commits

Author SHA1 Message Date
Dominik Picheta
39f78ae4f1 Merge pull request #3649 from yglukhov/nil-seq-copy
Fixed copying of nil seq in JS
2015-12-16 14:07:01 +00:00
Yuriy Glukhov
62422b93c6 Fixed copying of nil seq in JS 2015-12-16 15:25:58 +02:00
Federico Ceratto
e174aa1dbc Add SO_REUSEPORT support 2015-12-16 00:42:22 +00:00
Reimer Behrends
f664c576c2 Fix code generation issues with TNimType.
This is an alternative attempt to fix issue #2841 in a way that does not
rely on non-standard C compiler behavior.

The underlying problem is that the typeinfo module includes
system/hti.nim, but system/hti.nim is also included by system.nim. The
result is that the compiler at any given point has two instances of
TNimType with the same external name and will generate code either for
one or both of them. Code generation for the second version is normally
suppressed by using {.importc.}, but that results in a missing type
declaration for modules that only use the second version. This happens
for modules that import typeinfo, because the the second component of
typeinfo.Any has type PNimType = ptr TNimType, which generates a
"TNimType *" struct member.

The previous solution was to have a typedef for TNimType in nimbase.h;
however, this results in duplicate typedefs (specifically, but not only
for the code generated for typeinfo.nim). Duplicate typedefs with the
same type name are allowed in C++ and C11, but are explicitly forbidden
in C89 and C99. Modern versions of gcc and clang accept them anyway, but
this is not standard-compliant and may break for other C compilers or
older versions of gcc and clang.

This patch attempts to fix the issue by making the second component of
typeinfo.Nim a pointer instead of a PNimType and casting back and forth
as needed. Thus, the second version of TNimType occurs only within the
code for typeinfo.nim, where it can be safely omitted.
2015-12-15 13:33:38 +01:00
qio-io
135668a7ba Fixing too many open files on quit command with an explicit socket close, and importing the net module 2015-12-13 15:36:26 -04:00
JamesP
e731777853 add SQLErr (mapped to SQLError in odbc lib)
Add some SQLGetInfo consts

Fix SQLSetEnvAttr parameter
2015-12-09 14:28:49 +10:00
JamesP
16d7db47aa add db_odbc library module 2015-12-09 14:02:28 +10:00
Yuriy Glukhov
5545d36330 Fixed getAddrInfo on android 2015-12-08 12:30:38 +02:00
JamesP
8af8f7673b add timeinterval helping functions as per issue #3609
add tests to ttime.nim for timeinterval add/subtract functionality

Changed assert to doAssert in ttime.nim
Added extra tests to ttime.nim
Removal of singular help procs for working with TimeIntervals
Added TimeIin proc toSeconds(a: TimeInfo, interval: TimeInterval) where subtracting a year gave wrong results
Add overflow of units on initInterval eg, 65 seconds is 5 seconds and 1 minute
2015-12-08 10:16:42 +10:00
xiongxin
f3d578245b 7 div 5 == 1
7 div 5 == 1
2015-12-08 00:48:24 +08:00
Dominik Picheta
6f09282352 Merge pull request #3570 from juanfra684/patch-1
OpenBSD doesn't support AI_V4MAPPED
2015-12-04 15:29:56 +00:00
Dominik Picheta
60b23d1f7a Merge pull request #3595 from dfdeshom/devel
Print out more detailed error messages when compilation fails
2015-12-04 15:27:06 +00:00
Dominik Picheta
8e38510aff Merge pull request #3617 from FedericoCeratto/3611
Fix fsmonitor filter logic, add test. Closes: #3611
2015-12-04 15:17:03 +00:00
Federico Ceratto
97540b2ce4 Fix typo, minor rephrasing. 2015-12-03 15:57:55 +00:00
Sqwishy Trick
16b2f4a76f Using low() instead of high() in example for low() procedure 2015-12-02 20:59:34 -08:00
Araq
760242b870 removes 'x is iterator' special casing in the language 2015-12-03 01:08:03 +01:00
Federico Ceratto
05b856df23 Closes: #3611 2015-12-02 16:05:50 +00:00
JamesP
def25504e8 Add comment at end of file on where to find further tests 2015-12-01 23:05:37 +10:00
JamesP
f62e8558c8 Removal of tests from times module, that have been moved to ttime.nim test file 2015-12-01 18:08:52 +10:00
Araq
076b809677 set debug switch to false again 2015-12-01 00:53:30 +01:00
Araq
af29ea1ea2 proper color flipping 2015-12-01 00:53:30 +01:00
Araq
10530add48 next steps for the GC 2015-12-01 00:53:30 +01:00
Araq
9ed635d5c0 only mark roots when marking 2015-12-01 00:53:30 +01:00
Araq
070403ca5e first compiling version of the new GC 2015-12-01 00:53:30 +01:00
Araq
217e0ab6e9 lambda lifting support for iterToProc plugin 2015-12-01 00:53:30 +01:00
Araq
d7433d02bc fixes typo 2015-12-01 00:53:30 +01:00
Araq
9d1f197773 added CellSetIter for git's history 2015-12-01 00:53:30 +01:00
Araq
a1739455d3 first version of the new hard realtime GC 2015-12-01 00:53:30 +01:00
Bruce Doan
3b0d8fbea4 respect global log filter level 2015-11-28 16:41:07 +07:00
Araq
22ed2aab35 fixes memory leak for getAppFilename on Windows 2015-11-26 21:20:10 +01:00
dfdeshom
5b35efe5b7 Print out more detailed error messages when compilation fails 2015-11-26 12:23:26 -06:00
Araq
a2480efd68 allow 'nil ref T' as a first step which does nothing 2015-11-26 17:46:05 +01:00
Andreas Rumpf
0dcaf27b64 Merge pull request #3589 from yglukhov/dom-refactoring
Dom refactoring
2015-11-26 17:44:49 +01:00
Andreas Rumpf
8603d5849e Merge pull request #3588 from yglukhov/js-no-node
Removed Node, NodeType and Document definitions from jssys.
2015-11-26 17:41:56 +01:00
Andreas Rumpf
fbe6695a52 Merge pull request #3594 from theduke/unicode-validate-overlong
validateUtf8: catch overlong ascii
2015-11-26 17:34:21 +01:00
theduke
25b605a3a2 validateUtf8: catch overlong ascii
Make unicode.validateUtf8() check for overlong ascii representations, which are 2 bytes long and start with c0 or c1.
2015-11-26 16:05:24 +01:00
Yuriy Glukhov
2fcc37fd2b fixed float formatting for js 2015-11-26 01:10:52 +02:00
Yuriy Glukhov
c0754beb22 Dom refactoring 2015-11-25 19:27:13 +02:00
Yuriy Glukhov
0abfbf8f0d Removed Node, NodeType and Document definitions from jssys. 2015-11-25 16:37:36 +02:00
def
93e01da671 Fix options module to use new import name 2015-11-23 16:30:18 +01:00
def
7540cdd169 Update comment about map being in system module 2015-11-23 16:23:35 +01:00
Juan Francisco Cantero Hurtado
e0835948bd OpenBSD doesn't support AI_V4MAPPED
Related to #3534
2015-11-23 04:27:20 +01:00
Charles Blake
716c12a436 Fix loop index bug in scan for a[s] in b[s..s+len2-1].
a, b must both be indexed starting from s after the common
prefix "strip" phase.  This resolves issue 3477:
  https://github.com/nim-lang/Nim/issues/3477
2015-11-19 06:52:31 -05:00
Araq
ba6d0eb4db fixes #3541 2015-11-18 16:07:20 +01:00
jyelon
e8bc19f79c Add 'auto-decoration' to nimGetProcAddr
Maintainers of win32 DLLs can opt to provide libraries with
'decorated' function names (Google "stdcall name decoration").  To
pull a function pointer out of one of these DLLs, you have to pass a
decorated name to getProcAddress.  This is painful for the authors
of NIM DLL wrappers - they have to pass manually-decorated strings
to "importc", but only on win32.

This commit adds auto-decoration to nimGetProcAddress.  This function
will probe the DLL for the undecorated name, and if that fails, it
will automatically add decoration and try again.  That way, the author
of the wrapper doesn't have to deal with it.
2015-11-11 21:55:33 -05:00
JamesP
41861711c8 add doco for array/seq helper procs 2015-11-12 07:03:16 +10:00
JamesP
52e40995b7 added helper procs for standalone calc of stats for array/seq
Changed derivation to use runningstats, so there
is a single point of truth for the calculations, and provides
more stats functions
2015-11-12 06:33:26 +10:00
Varriount
3832ea0785 Prevent Exported C procedure collisions
Prevents collisions between those C externalized procedures in parseopt and parseopt2.
2015-11-11 15:18:13 -05:00
Dominik Picheta
29fd3edb9c Merge pull request #3514 from vegansk/3513_pgsql_prepstat
Fixed issue 3513: wrong setupQuery realization
2015-11-11 16:09:18 +00:00
JamesP
4cefbc2914 add comment to identify where RunningStat code resides 2015-11-11 08:56:51 +10:00