Commit graph

151 commits

Author SHA1 Message Date
William S Fulton
6d0c495fd0 Add missing parameter names in STL container wrappers
Mostly in STL copy constructors.

Best to have parameter names as they make their way into the wrappers in
some target languages.
2019-02-13 22:45:47 +00:00
William S Fulton
cd7772a274 Fix overloading for non-pointers and NULL - Lua 2018-12-30 10:54:53 +00:00
William S Fulton
ca287ae13b Add support for non-default compare template argument in std::map wrappers 2018-10-09 19:44:00 +01:00
luz.paz
60dfa31a67 Misc. typos
found via `codespell` and `grep`
2018-05-17 10:04:23 -04:00
Olly Betts
90f9117e10 Fix various comment and documentation typos 2017-08-13 18:04:33 +12:00
William S Fulton
50e6611a9c Merge branch 'jleveque-warning_fix'
* jleveque-warning_fix:
  [Lua] Fix compiler warnings
2017-04-25 07:31:31 +01:00
William S Fulton
7b9d94db2e Fix Lua warning for missing (SWIGTYPE CLASS::*) typemaps for C wrappers 2017-04-25 07:29:54 +01:00
Joe LeVeque
e66d8125aa [Lua] Fix compiler warnings 2017-03-31 01:45:26 -07:00
William S Fulton
72ba741d1c Fix wrapping of references/pointers and qualifiers to member pointers
Also fix Go wrapping of member const function pointers.
2017-03-16 21:04:38 +00:00
Daniel Vollmer
ce1cb85d86 Add <typeinfo> header for std::bad_cast 2016-09-17 13:24:32 +02:00
Daniel Vollmer
2dc87d7485 Add std::bad_cast to std_except.i
This exception occurs when dynamic_cast<T&> fails.

Fixes #783.
2016-09-17 10:26:54 +02:00
Alexander Warg
4363160400 Fix lua base class methods with __getitem
When a C++ class defined a __getitem function the base classes where
never used for resolving methods. This fix first scans the '.get' and
'.fn' tables of all base classes and only if there is no result does the
same for __getitem functions.
2016-03-17 07:46:44 +01:00
Nils Gladitz
ca208cfe35 lua: push characters as unformatted 1-character strings
Since Lua 5.3 the "%c" format character in lua_pushfstring will produce
the string "<\XXX>" (XXX being a decimal code sequence) when
given unprintable characters.

Use lua_pushlstring instead to reproduce the old behavior.
2015-07-01 12:24:12 +02:00
Alexander Warg
ece1009c5d lua: push integer constants as integer
This allows better compatibility with Lua 5.3. Otherwise function
overloading assuming integer parameters might not work.
2015-04-28 17:09:57 +02:00
Thomas Trocha
4e7af7db80 [lua/luarun] change return type from int to void on functions not returning anything
Using emscripten compiler to crosscompile to javascript lead to "traps" on this functions which results in a crash
2015-01-11 15:34:07 +01:00
William S Fulton
cb4d0dbba5 %constant and structs support for Lua 2014-12-29 17:36:56 +00:00
Artem Serebriyskiy
4457d96e54 Moving variable declaration to the beginning of the block 2014-05-28 22:02:47 +04:00
Artem Serebriyskiy
2b4c49d017 Add default __eq implementation
* Renamed SWIG_Lua_equal to SWIG_Lua_class_equal
* If class has no __eq implemented, then default __eq is provided.
  Default __eq compares actual pointers stored inside Lua userdata
2014-05-28 22:01:23 +04:00
Olly Betts
703862dc3a Fix unused variable warning in Lua bindings 2014-05-28 23:04:06 +12:00
William S Fulton
10cbd2781f Refactor Lua class base search to make ISO c/c++ compliant 2014-05-24 14:13:24 +01:00
William S Fulton
3191473523 Fix compiler warnings in generated code when using -std=c++98 -std=gnu89 -pedantic -Wreturn-type 2014-05-24 14:13:19 +01:00
Olly Betts
1a0b8abec7 Fix comment typo 2014-05-24 11:11:51 +12:00
Olly Betts
8d3902a666 Work towards C90 compatibility for Lua 2014-05-24 11:10:57 +12:00
Olly Betts
95f09b49d2 Don't use // comments in C code. 2014-05-18 20:38:43 +12:00
William S Fulton
80953ccfc9 Fix some typos 2014-05-01 18:49:42 +01:00
Olly Betts
4c86f17bcb Merge pull request #159 from v-for-vandal/issue_154
Fixing issue 154
2014-04-29 11:19:58 +12:00
Artem Serebriyskiy
c1ca144ed2 Fixed errors from previous commit.
Also in previous commit also fixed warning with unsigned vs signed
comparison
2014-04-23 01:48:10 +04:00
Artem Serebriyskiy
5506c7f624 Removed all unnecessary asserts 2014-04-23 01:37:14 +04:00
Artem Serebriyskiy
d120c05fcc Optimize metamethods inheritance resolving
* a table of metamethods that should be inherited is now stored in
  SWIG registry table. It optimizes memory usage.
2014-04-22 14:31:41 +04:00
Artem Serebriyskiy
8512bad8c2 Fixing unused variable warnings
* Fixing unused variable warning. Generated code should compile
  with -Wall -Werror flags

* Fixing forgotten __Module -> SwigModule renaming
2014-04-16 03:37:27 +04:00
Artem Serebriyskiy
7c8405368e Finish implementation with proxy functions 2014-04-15 03:38:45 +04:00
Olly Betts
90e6d6c012 Fix comment typo 2014-04-02 23:45:58 +13:00
Olly Betts
72305ceec8 Fix compiler warnings in generated Lua code 2014-04-02 23:44:35 +13:00
Artem Serebriyskiy
f2c410a8c0 Fixing issue 152 2014-03-23 14:05:05 +04:00
William S Fulton
9c1bd797b9 Fix missing return statements in Lua code 2014-03-14 23:58:15 +00:00
Artem Serebriyskiy
1da65de2b7 Removing all TODO:REMOVE 2014-03-03 11:29:04 +04:00
Artem Serebriyskiy
cad7f86112 __Static -> SwigStatig, __Module -> SwigModule 2014-03-03 09:27:16 +04:00
William S Fulton
0da97a9d3e Fix illegal C++ symbols 2014-02-28 19:19:44 +00:00
William S Fulton
f011481f2b Cosmetic tweaks to lua runtime 2014-02-28 19:15:51 +00:00
William S Fulton
58caa38616 Restore Lua C++11 rvalue reference 2014-02-28 19:15:51 +00:00
William S Fulton
1be97ed26c Merge Lua changes - branch 'class_p1' of github.com:v-for-vandal/swig into v-for-vandal-class_p1
* 'class_p1' of github.com:v-for-vandal/swig:
  Fixing registerClass. No more wrap: unnecessary attributes
  Fixed registerMethod to work like registerVariable
  Switched to Swig_name_* functions
  Return MIN_OPT_LEVEL for elua
  add nspace_extend test case
  updated documentation following comd options renaming
  Options in alphabetical order
  Members renaming
  target_name -> lua_name
  Fixing cmd options, again
  Fixing segfault
  Removed class_parent_nspace
  Fixes to module options
  Rename methods to make it clear what 'symbols table' they operate on.
  Small documenation fixes
  Updating Lua documentation
  Eliminating namespaces_hash and using symbols table instead
  Attempt to catch unreproducable bug from Travis CI build
  Small bugfixes
  Bugfixes for eLua. eLua emulation mode
  Add compatibility option for old-style inheritance
  Add support for C-style enums in C mode. And tests.
  Style fixes. Comments fixes. Fixing cmd options. etc
  Some fixes for elua
  Attempt to fix unreproducable bug (from Travis CI build)
  Fixes for examples. Wrapped keywords into guardian in keyword_rename test
  Remove some typos
  Remove some obsolete code
  Manually beautifying luarun.swg
  Code beautifier
  Valuewrapper test
  Removing obsolete debug code
  Bugfixes
  A few bugfixes
  Some class bases iteration improvements
  Fixes for elua
  Bugfixes
  Bugfixes. CMD args handling. Code cleanup
  Bugfixes
  Preparations before pull request - part 1
  More changes. Mostly to the would-be class library
  Fixing issuse with v2-compatible static function names
  Add pointer guard
  Add runtime test
  Bugfixes
  nspace.i example is working
  Initial implementation - everything compiles but might not work
2014-02-27 20:04:08 +00:00
Artem Serebriyskiy
be6723df1e Return MIN_OPT_LEVEL for elua 2014-02-23 16:30:23 +04:00
Olly Betts
2f3bf144c6 Fix assorted comment and documentation typos 2014-02-23 17:15:22 +13:00
Olly Betts
1097fc99ff [Lua] Add keyword warnings for Lua keywords and Basic Functions. 2014-02-19 23:04:40 +13:00
Artem Serebriyskiy
14452cad03 Attempt to catch unreproducable bug from Travis CI build 2014-02-19 13:34:49 +04:00
Artem Serebriyskiy
0c6263a0c2 Small bugfixes 2014-02-19 13:34:49 +04:00
Artem Serebriyskiy
705beb6753 Bugfixes for eLua. eLua emulation mode 2014-02-19 13:34:49 +04:00
Artem Serebriyskiy
0ee724ca80 Add compatibility option for old-style inheritance 2014-02-19 13:34:49 +04:00
Artem Serebriyskiy
4b0ed73317 Style fixes. Comments fixes. Fixing cmd options. etc 2014-02-19 13:34:49 +04:00
Artem Serebriyskiy
ce2760f77e Fixes for examples. Wrapped keywords into guardian in keyword_rename test 2014-02-19 13:34:49 +04:00