Closed Sygmei closed 8 years ago
Tested on Linux by travis-ci https://travis-ci.org/satoren/kaguya Can you write minimal code for error case?
Look like require GameObject and 4 strings, but arguments is GameObject and 3 strings.
You were right, the problem is that the last string is supposed to be facultative in C++ It works on Windows (cause Lua seems to send default nil as parameter). On Linux it doesn't work :(
It will error if the argument is not enough. Even Windows(MSVC 2008~2015). https://ci.appveyor.com/project/satoren/kaguya/build/1.0.681
Okay, you were right, it doesn't work on the current version of Kaguya, it worked on Windows because I had an older version of Kaguya which passed null arguments when not provided (empty strings, zeros, empty lists etc...). Is there a way to enable this feature again or even better : use C++ default arguments ? (Even if it's not possible to detect them in function header, maybe providing them again while binding the function)
It works now on Linux using an older version of Kaguya.
Another strange thing on Linux is the type of custom Objects :
type(obj)
gives :
On Windows : kaguya_object_type_class mse::Script::GameObject
On Linux : kaguya_object_type_PN3mse6Script10GameObjectE
obj is a userdata from C++
Is it cause of Lua or Kaguya ?
Older version is demangle not supported. support at 402765b2fc7de23927c4f32a5ab1f805ed22081a
Default parameter is supported. #17
Well, thanks a lot, now everything is working under both Windows AND Linux :) Continue the good work :)
Has your lib been tested on Linux :) ? It works perfectly on Windows but I want to pass a string as parameter on Linux is says :
maybe...Argument mismatch:GameObject,string,string,string candidate is: GameObject,std::__cxx11::basic_string<char, std::char_traits<char> std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>n std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>n std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>n std::allocator<char> >,
But basically, a
std::__cxx11::basic_string<char, std::char_traits<char> std::allocator<char> >
IS a string. Is it cause of Lua or Kaguya ?