Skip to content

Instantly share code, notes, and snippets.

@yihuang
Created December 28, 2015 15:07
Show Gist options
  • Select an option

  • Save yihuang/dabd623fd025f37cdd1f to your computer and use it in GitHub Desktop.

Select an option

Save yihuang/dabd623fd025f37cdd1f to your computer and use it in GitHub Desktop.
lua-intf test
#include "LuaIntf/LuaIntf.h"
extern "C" {
#include "lua.h"
}
using namespace LuaIntf;
void test(char* s) {
}
void open(lua_State* L) {
LuaBinding(L).addFunction("test", &test);
}
// $ clang++ -std=c++11 -c %
// ...
// ./LuaIntf/impl/CppInvoke.h:66:21: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'const char *'
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment