Commit Graph

243 Commits

Author SHA1 Message Date
76fa8939e9 Merge pull request #211 from rajkosto/master
Fix build when SQUSEDOUBLE is defined
2020-03-11 17:01:58 +08:00
34412db7d4 Merge pull request #213 from RobLoach/patch-1
Add FreeBSD to supported platforms
2020-03-11 17:01:00 +08:00
a25d431105 Merge pull request #204 from jet082/master
ios support
2020-03-11 17:00:37 +08:00
03341c7e60 docs: Add FreeBSD to supported platforms
Fixes #195
2020-02-27 13:57:38 -05:00
521903906a Fix build when SQUSEDOUBLE is defined 2020-02-19 13:44:43 +01:00
98aef14d70 Merge pull request #206 from linuxmaniac/vseva/fix_205
fix compilation warning
2019-11-30 14:18:18 +08:00
7a973ad90d fix compilation warning
> albertodemichelis/squirrel/squirrel/sqbaselib.cpp: In function ‘SQInteger __map_array(SQArray*, SQArray*, HSQUIRRELVM)’:
> albertodemichelis/squirrel/squirrel/sqbaselib.cpp:646:9: warning: ‘nArgs’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>         if (nArgs >= 4)
>         ^

fixes #205
2019-11-28 14:03:24 +01:00
e92667c49c ios support 2019-11-16 08:21:16 -08:00
9dcf74f990 Merge pull request #149 from VasiliyRyabtsev/null-to-string
Print null as 'null', not as '(null : 0x00000000)'
2019-09-21 00:04:29 +08:00
2aa00f4dd4 Merge pull request #198 from nikolas/patch-4
Spelling fix in sqcompiler error
2019-09-21 00:03:08 +08:00
31611a84ec Spelling fix in sqcompiler error
This error isn't as clear as it could be, but I think this would be break, not brake.
2019-09-18 21:15:47 -04:00
e26f40b8cb Merge pull request #191 from nikolas/patch-3
SQVM::dumpstack: fix WEAKREF typo
2019-08-31 18:20:49 +08:00
cbfbb60d94 SQVM::dumpstack: fix WEAKREF typo 2019-08-27 18:42:09 -04:00
1b25d4acda Merge pull request #180 from iSLC/master
Implement sq_throwerrorf to allow formatted error messages.
2019-08-16 12:21:36 +08:00
260412d33c Merge pull request #188 from nikolas/remove-unnecessary-assignments
sqfuncstate: Remove some unnecessary assignments
2019-08-16 12:20:28 +08:00
e9b990bb26 Merge pull request #189 from nikolas/patch-1
Fix docs typo: trough -> through
2019-08-16 12:20:06 +08:00
d75133e261 Merge pull request #190 from nikolas/patch-2
Fix typo in error message: delagate -> delegate
2019-08-16 12:18:27 +08:00
10b828ca7e Fix typo in error message: delagate -> delegate 2019-08-12 20:26:03 -04:00
186e722c05 Fix docs typo: trough -> through 2019-08-10 20:55:40 -04:00
89ecaa6f1b sqfuncstate: Remove some unnecessary assignments 2019-08-10 20:29:44 -04:00
3b8375829c Merge pull request #187 from kyleedwardsny/cmake-improvements
CMake improvements
2019-08-03 15:52:09 +08:00
8f04b266f5 Create package export file
The package export file allows CMake consumers to find Squirrel by
calling find_package(squirrel). This will create imported targets
for them to link against.

Create export files in both the build directory and the install
directory.
2019-07-29 22:13:13 -04:00
91bb6b28fd Make various improvements to the CMake scripts
Set minimum required to 3.4 across the board. Use standard
GNUInstallDirs variables instead of custom INSTALL_BIN_DIR and
INSTALL_LIB_DIR. Use generator expressions and commands instead of
variables when possible. Use Runtime, Development, and Libraries
components in the installation. Set up the layout of the build tree
to match the installation tree. Replace compiler-specific flags with
more general cross-platform settings when possible. Update COMPILE
with new configure and install instructions. Add alias targets.
2019-07-29 22:13:13 -04:00
ae49b12aa1 Move throwerrorf into the aux standard library. Implement pushstringf into the string library as well. 2019-04-24 21:36:52 +03:00
235fcd9be7 The number returned by vsnprintf contains the actual number of characters. If the message was smaller than the estimated size. It would've created a string with garbage after the null character. 2019-04-23 23:41:32 +03:00
bc126fd0ab The f was not included in the function name. Copy>paste mistake. 2019-04-23 23:29:28 +03:00
454e35fc23 Implement sq_throwerrorf to allow formatted error messages. 2019-04-23 23:19:43 +03:00
51137b84e6 fix free variables in generators 2019-04-23 23:36:46 +08:00
a120da4974 fixed 0.0 and -0.0 comparison 2019-03-12 22:06:05 +08:00
ca2c74b319 removed unused extension from sphinx config 2019-03-12 21:59:59 +08:00
6bf9ab5162 added table.keys() and table.values() 2019-03-12 21:57:54 +08:00
46f8cd6efd added post call initializer syntax 2019-03-12 21:46:56 +08:00
a1cbf6e5ab Merge branch 'master' of https://github.com/albertodemichelis/squirrel 2019-03-12 21:10:39 +08:00
8e27debcac change in HISTORY 2019-03-12 21:01:15 +08:00
780e9c96b3 Merge pull request #167 from VasiliyRyabtsev/feature/reduce-initializer
Add optional initializer to array.reduce()
2018-12-02 02:34:16 +08:00
9bc87aebfc Merge pull request #168 from VasiliyRyabtsev/feature/map-apply-extra
Allow additional parameters in array.map()/array.apply() handler
2018-12-02 02:33:41 +08:00
8e5b1e70d0 Allow additional parameters in array.map()/array.apply() handler
Sometimes it is needed to process array when result depends not
on item value only, but also from its position or collection content.
So make array.map() and array.apply() functions more flexible by
supporting optional additional parameters in callback: item index
and reference to array being processed.
(The design is like in https://underscorejs.org/#map)
2018-10-31 18:37:01 +03:00
04cf1c2ed0 Add optional initializer to array.reduce() 2018-10-31 18:07:25 +03:00
3c216b0541 Merge pull request #163 from atanasovdaniel/doc_ignore
Ignore only doc/build folder
2018-10-30 14:50:59 +08:00
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
d794bb689d Print null as 'null', not as '(null : 0x00000000)' 2018-07-20 20:34:07 +03: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