Commit Graph

203 Commits

Author SHA1 Message Date
377c381cd7 Ignore only doc/build folder 2018-10-20 22:50:19 +03:00
8888dc1d8c Merge pull request #160 from iSLC/master
Removing dead code in sq_call
2018-10-09 14:51:47 +08:00
969ca8ee70 Refactor sq_call to get rid of dead code.
After doing a `return SQ_ERROR;` in the else branch the following code is never reached. So the function either returns SQ_ERROR on failure to invoke the closure or SQ_OK in all other cases. Same behavior different code.
2018-10-03 21:52:32 +03:00
960c5da6b9 Remove unnecessary return.
The return after the conditional branch will achieve the same thing.
2018-10-03 21:33:21 +03:00
68d7c7f516 Merge pull request #1 from albertodemichelis/master
Sync
2018-10-03 21:30:49 +03:00
387451d808 Merge pull request #138 from atanasovdaniel/read_type
Make 'read' parameter of SafeRead and CheckTag of type SQREADFUNC
2018-09-10 18:57:44 +08:00
ce08d63e4d Merge pull request #145 from VasiliyRyabtsev/master
Fix typo in method names (Intruction -> Instruction)
2018-07-20 16:02:42 +08:00
92442f0add Merge pull request #146 from VasiliyRyabtsev/signed-args-count
Make params count type signed in sq_getclosureinfo()
2018-07-20 16:02:15 +08:00
665b5b1c5d Make params count type signed in sq_getclosureinfo()
For native closures this method returns _nparamscheck value
which can be negative when function accepts variable number of
arguments - and it's incorrect to cast it to unsigned.

Also, _nparameters, _noutervalues and _nparamscheck fields are
actually signed integers, so it is better to keep them signed.
And casting _noutervalues is ok since it has enough capacity.
2018-07-20 09:49:38 +03:00
0a5cc81b55 Make params count type signed in sq_getclosureinfo()
For native closures this method returns _nparamscheck value
which can be negative when function accepts variable number of
arguments - and it's incorrect to cast it to unsigned.

Also, _nparameters, _noutervalues and _nparamscheck fields are
actually signed integers, so it is better to keep them signed.
And casting _noutervalues is ok since it has enough capacity.
2018-07-20 09:41:10 +03:00
436f033e8a Fix typo in method names (Intruction -> Instruction) 2018-07-20 08:55:00 +03:00
d523a46862 Merge pull request #144 from DerDakon/cmake-vars
properly check CMake variables for being set
2018-07-05 12:29:23 +08:00
73692881c1 CMake: properly set default build type 2018-07-04 18:57:05 +02:00
4ccc03fbac CMake: properly check for variables
Checking them for being defined would get the user intention wrong if they are
passed as -DDISABLE_STATIC=Off as that would still count as being defined. Just
check for the variable, which has the desired effect. An unset variable is
always false. Since these flags are options now the variables are always set,
so one cannot disable this features anymore otherwise.
2018-07-04 18:53:21 +02:00
1eaaa4b465 Merge pull request #143 from trofi/master
CMakeLists.txt: explicitly declare LONG_OUTPUT_NAMES and DISABLE_STATIC
2018-07-04 15:19:55 +08:00
ad5411d091 CMakeLists.txt: explicitly declare LONG_OUTPUT_NAMES and DISABLE_STATIC
Toralf noticed a minor infelicity in option declarations:
```
build $ cmake -DLONG_OUTPUT_NAMES=YES ..
CMake Warning:
  Manually-specified variables were not used by the project:

    LONG_OUTPUT_NAMES
```

Note, CMake complains here about "unused" LONG_OUTPUT_NAMES.
The option is used but not declares as user-tweakable via 'option()'.

This change adds declarations for variables used in Gentoo.

Reported-by: Toralf Förster
Bug: https://bugs.gentoo.org/659880
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2018-07-04 07:43:04 +01:00
c323eccc27 Merge pull request #139 from todace/more_details_in_call_script
more details in script errors on call apis
2018-06-27 12:25:54 +08:00
cd6f608677 Merge pull request #111 from dunst0/patch-1
make the compiler configurable by CC variable
2018-06-27 12:24:38 +08:00
02b773b4ae Merge pull request #141 from todace/easy_chaining
now container modification methods return object itself in all cases
2018-06-21 16:51:18 +08:00
f4665e155e now container modification methods return object itself in all cases
for easy chaining
2018-05-29 02:33:19 +03:00
b2e07673ae more details in script errors on call apis 2018-05-29 02:18:06 +03:00
22640a1c0d Make 'read' parameter of SafeRead and CheckTag of type SQREADFUNC 2018-05-05 14:06:52 +03:00
dda695e95f Merge pull request #137 from PallHaraldsson/patch-1
Typo e.g. "it's"
2018-04-12 02:06:22 +08:00
4a8ed6a67a Typo e.g. "it's" 2018-04-11 10:28:02 +00:00
453a966890 Merge pull request #119 from VasiliyRyabtsev/feature/table-filter
Implement table.filter() default delegate in base library
2017-12-05 16:28:35 +08:00
0be2bebef0 Merge pull request #121 from VasiliyRyabtsev/feature/assert-message
Add optional message text parameter for assert()
2017-12-01 14:54:37 +08:00
c10a777285 Add optional message text parameter for assert() 2017-12-01 11:49:44 +07:00
938655a90b Merge pull request #120 from VasiliyRyabtsev/fix/array-resize
Raise error for negative size in array_resize()
2017-11-29 02:04:16 +08:00
497c8f9d47 Raise error for negative size in array_resize()
Instead of trying to allocate invalid size and most probably crashing with out-of-memory
2017-11-28 23:25:58 +07:00
ee38035634 Implement table.filter() default delegate in base library
Filter callback is the same as for array.filter(), ie function(key, value)
2017-11-28 23:08:10 +07:00
249a26e829 Merge pull request #117 from breakin/fix/documentation-bugs
Fix some small bugs in the documentation examples
2017-11-21 02:38:40 +08:00
7d589eb444 Fix some small bugs in the documentation examples. 2017-11-20 15:35:44 +01:00
b00cd02629 Merge pull request #114 from breakin/fix/doc-references_from_c
Fix errors in documentation source code
2017-11-17 04:19:14 +08:00
5460758eb0 some doc on sq_tailcall 2017-11-17 04:14:15 +08:00
3835c65eab some sq_type were missing 2017-11-17 04:13:59 +08:00
ab7243ca59 Merge branch 'master' of https://github.com/albertodemichelis/squirrel 2017-11-17 04:01:47 +08:00
b89da87b10 fixed free variables not boxing for loop counter when a break is used 2017-11-17 04:01:34 +08:00
effd225a84 fixed \u in lexer 2017-11-17 03:56:28 +08:00
d2de0ef10d fix in blob 2017-11-17 03:55:59 +08:00
3c2de4bd59 added sq_tailcall() 2017-11-17 03:55:35 +08:00
5c737b040a Fix errors in documentation source code 2017-11-16 16:05:04 +01:00
7fe2a71c13 Merge pull request #112 from breakin/fix/sq_newmember_pop
sq_newmember and sq_rawnewmember argument popping
2017-11-15 19:36:20 +08:00
2fa5378a1a Merge pull request #113 from breakin/fix/sq_newclass_doc
Clarify that sq_newclass pushes the new class in the stack.
2017-11-15 05:51:19 +08:00
26a655a503 Clarify that sq_newclass pushes the new class in the stack. 2017-11-14 13:29:44 +01:00
74cca2d7d3 Fix a bug where sq_newmember and sq_rawnewmember did not pop their arguments. 2017-11-14 13:22:05 +01:00
d74bcec394 make this as well configureable to support more compilers 2017-11-14 11:31:33 +01:00
6ececc28e2 make the compiler configurable by CC variable
this would make it easier to integrate it in upstream projects where more compiler are accepted.
2017-11-14 11:30:01 +01:00
a7df1b46a4 Merge pull request #105 from zeromus/master
replace newly added sqtype with previously existing sq_type
2017-09-26 18:06:51 +08:00
31738a5b37 use sq_type (which already existed in the public API) instead of the identical sqtype (which was introduced by commit a3a78eec20) 2017-09-22 21:22:43 -04:00
a0857ae0b8 Merge pull request #97 from miconda/master
configurable makefile vars from command line
2017-07-31 15:41:36 +08:00