Commit graph

88 commits

Author SHA1 Message Date
luz.paz
ed28e7cbe2 Misc. typo and whitespace fixes
Found via `codespell -q 3 -L "uint,bae,objext,cmo,goin,struc,ois,upto"`
whitespaces were unintentionally fixed due to my editors settings.

Rebased patch #1327
2018-09-19 20:29:14 +01:00
luz.paz
60dfa31a67 Misc. typos
found via `codespell` and `grep`
2018-05-17 10:04:23 -04:00
William S Fulton
f4644d7c30 Run overload_complicated testcase
Was marked as broken, seems to work now
2017-10-04 20:43:44 +01:00
William S Fulton
67edda3bf5 Remove unused cvsignore target 2017-03-10 23:25:31 +00:00
Paweł Tomulik
350d43d988 handle const pointers to functions 2016-03-24 10:59:23 +01:00
Alexander Warg
be907f96e0 Add test case for Lua __getitem + inheritance 2016-03-17 07:48:01 +01:00
William S Fulton
9600c95234 Duplicate tests that are run twice as both C and C++ tests to fix parallel make: li_carrays 2016-02-21 18:04:04 +00:00
William S Fulton
78b113558f Duplicate tests that are run twice as both C and C++ tests to fix parallel make: keyword_rename 2016-02-21 18:04:04 +00:00
William S Fulton
ca64b06229 Consistent quoting in Makefile 2015-08-21 22:48:34 +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
William S Fulton
be272ff8cd Add c++11 strongly typed enum support for Lua 2014-11-28 07:47:45 +00:00
William S Fulton
c17f77750a Merge pull request #176 from v-for-vandal/lua_eq
Add default __eq implementation for Lua
2014-06-02 19:52:07 +01:00
Karl Wette
3fe1eb7056 Set SRCDIR when calling test-suite clean targets, in case it's needed 2014-05-29 02:29:27 +02:00
Artem Serebriyskiy
46d7645c9a More tests for equality operator overloading 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
def3c08943 Fix comment typos 2014-05-18 20:20:30 +12:00
William S Fulton
2b5499a262 Slight simplification of test-suite build for new out-of-source changes
Provide default SRCDIR and SCRIPTDIR variables in common.mk and override
only where needed.
2014-05-15 23:11:07 +01:00
Karl Wette
f574a34155 Allow examples and test-suite to be built out of source tree
- Examples/Makefile.in rules use SRCDIR as the relative source directory

- ./config.status replicates Examples/ source directory tree in build
  directory, and copies each Makefile to build directory, prefixed with
  a header which sets SRCDIR to source directory

- Examples/test-suite/.../Makefile.in set SRCDIR from Autoconf-set srcdir

- Examples/test-suite/errors/Makefile.in needs to filter out source
  directory from SWIG error messages

- Lua: embedded interpreters are passed location of run-time test

- Python: copy run-time scripts to build directory because of 2to3
  conversion; import_packages example copies __init__.py from source
  directory; test-suite sets SCRIPTDIR to location of run-time tests

- Javascript: binding.gyp renamed to binding.gyp.in so that $srcdir
  can be substituted with SRCDIR; removed './' from require() statements
  so that NODE_PATH can be used to point Node.js to build directory
2014-05-11 23:21:10 +02:00
Karl Wette
d5b765d388 Whitespace cleanup of all Makefiles*
- some of the %.clean rules in the test-suite Makefiles were using a single tab
  as an empty rule, dangerous! I've replaced these with the safer '@exit 0'.
2014-05-02 20:06:11 +02:00
William S Fulton
80953ccfc9 Fix some typos 2014-05-01 18:49:42 +01:00
Artem Serebriyskiy
7c8405368e Finish implementation with proxy functions 2014-04-15 03:38:45 +04:00
William S Fulton
2071b7d157 Lua test-suite can now be run out of source 2014-04-01 19:33:20 +01:00
Artem Serebriyskiy
f2c410a8c0 Fixing issue 152 2014-03-23 14:05:05 +04:00
Artem Serebriyskiy
ddbf439db9 Working around some of the SWIG internal issues with enums 2014-03-12 18:00:15 +04:00
Artem Serebriyskiy
3028b16cee Partially disabling old names generation for classes with nspace 2014-03-06 15:24:17 +04:00
Artem Serebriyskiy
1898099620 Fixing enums 2014-03-03 09:54:13 +04:00
William S Fulton
c36800713b Use unix fileformat 2014-02-27 20:12:53 +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
d1bfd8a517 add nspace_extend test case 2014-02-23 14:23:55 +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
705beb6753 Bugfixes for eLua. eLua emulation mode 2014-02-19 13:34:49 +04:00
Artem Serebriyskiy
6d49a57b53 Add support for C-style enums in C mode. And tests.
In backward compatible mode C style enums binding are correctly
generated
2014-02-19 13:34:49 +04:00
Artem Serebriyskiy
9bd39fe4fa Valuewrapper test 2014-02-19 13:34:49 +04:00
Artem Serebriyskiy
f1fb2cc295 Bugfixes 2014-02-19 13:34:48 +04:00
Artem Serebriyskiy
9d6cd75c73 Bugfixes 2014-02-19 13:34:48 +04:00
Artem Serebriyskiy
da0510376c Bugfixes. CMD args handling. Code cleanup 2014-02-19 13:34:48 +04:00
Artem Serebriyskiy
aec4391284 Add runtime test 2014-02-19 13:34:48 +04:00
Artem Serebriyskiy
8b35c0b5ce Add runfile to check for correct compatibility name generation
Checks that if OldClass was renamed to NewClass, then not only
OldClass.static_method is now NewClass.static_method, but also
compatibility name OldClass_static_method is now NewClass_static_method.
Same for enums, static vars etc
2013-11-09 14:54:36 +00:00
Artem Serebriyskiy
14de0de5e7 Tests for arrays and global vars 2013-11-09 14:54:35 +00:00
Artem Serebriyskiy
b901979d1c Tests for enum/consts old-style bindings and for static const char; bindings 2013-11-09 14:54:35 +00:00
Artem Serebriyskiy
89bc5576c9 More tests 2013-11-09 14:54:35 +00:00
Artem Serebriyskiy
b9ba05be81 Style patches 2013-11-09 14:54:34 +00:00
Artem Serebriyskiy
c9279ab0e7 More tests 2013-11-09 14:54:34 +00:00
Artem Serebriyskiy
dfc02f306d First banch of tests 2013-11-09 14:54:33 +00:00
Artem Serebriyskiy
c3f3880d0c Lua static member access improvements.
1) Static members and static functions inside class can be accessed as ModuleName.ClassName.FunctionName (MemberName respectively). Old way aka ModuleName.ClassName_FunctionName still works.
2) Same goes for enums inside classes: ModuleName.ClassName.EnumValue1 etc.
3) More 'runme' tests for lua + modifications to existing tests to test new changes.

Code is loosely based upon python implemenation of the same thing.

Patch #62.
2013-09-12 21:32:26 +01:00
William S Fulton
079165abe2 Convert to unix fileformat 2013-01-12 16:54:45 +00:00
William S Fulton
1bc105bd72 Add missing Lua factory.i test for patch #3219676
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13015 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-24 18:56:16 +00:00
William S Fulton
5c8e5542ef Apply #3219676 from Shane Liesegang which adds: - support for %factory - a __tostring method - a __disown method
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12978 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-13 18:28:37 +00:00
Olly Betts
e3eb54594e [Lua] Add support for Lua 5.2 (patch SF#3514593 from Miles Bader)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12968 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-04-05 04:29:11 +00:00