Cuberite Forum
Bindings.cpp - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: Bindings.cpp (/thread-1366.html)



Bindings.cpp - Narroo - 02-12-2014

Okay, I was trying to modify /src/Bindings/Bindings.cpp in order to change the API. (Change the Lua Binding command from UnloadUnusedChunks to QueueUnloadUnusedChunks)

The changes aren't showing up in Git. In fact, when I checked the repository, I couldn't find Bindings.cpp at all. So, where did this come from - it doesn't seem auto generated. What do I do with thing?


RE: Bindings.cpp - xoft - 02-12-2014

The file is auto-generated, by the ToLua+ program. It scans the header files and creates Lua bindings for specifically marked classes and functions - that's what all the "// tolua_export" comments are for.
Normally to export a function to the Lua API, you need to mark it with the comment, or make sure it is inside between "// tolua_begin" and "// tolua_end". Then, if you're on windows, you need to manually update the Bindings file, by running script file $/src/Bindings/AllToLua.bat. Linux build system should take care of this step automatically.


RE: Bindings.cpp - Narroo - 02-13-2014

Oh. OHHH! Alright, that helps massively!