Skip to content
This repository was archived by the owner on Dec 29, 2024. It is now read-only.

Commit 04b607c

Browse files
authored
2.0-stable (#136)
1 parent 19a8c8e commit 04b607c

3 files changed

Lines changed: 7 additions & 15 deletions

File tree

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* [About](#about)
55
* [Features](#features)
66
* [Release Builds](#release-builds)
7-
* [TODO](#todo)
87
* [Compiling](#compiling)
98
* [Getting Started](#getting-started)
109
* [Contributing And Feature Requests](#contributing-and-feature-requests)
@@ -67,10 +66,6 @@ Release Builds
6766
- [🗜️ Export Templates](https://github.com/WeaselGames/godot_luaAPI/releases/latest/download/export-templates.tpz)
6867
- For previous versions see [releases](https://github.com/WeaselGames/godot_luaAPI/releases)
6968

70-
TODO
71-
-----
72-
- Workaround for lack of CallableCustoms in GDExtension
73-
7469
Compiling
7570
------------
7671
This build is for godot 4.0-stable.

SConstruct

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ import fnmatch
66
env = SConscript("external/SConscript")
77
env.tools=['mingw']
88

9-
env.Append(CPPDEFINES = ['LAPI_GDEXTENSION'])
10-
env.Append(CPPPATH = [Dir('src').abspath, Dir('external').abspath])
9+
env.Append(CPPDEFINES = ['LAPI_GDEXTENSION'])
10+
env.Append(CPPPATH = [Dir('src').abspath, Dir('external').abspath])
11+
1112
sources = Glob('*.cpp')
1213
sources.append(Glob('src/*.cpp'))
1314
sources.append(Glob('src/classes/*.cpp'))

src/luaState.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,8 @@ LuaError *LuaState::pushVariant(lua_State *state, Variant var) {
355355
lua_pushnil(state);
356356
break;
357357
}
358-
// If the type being pushed is a lua error, Raise a error
358+
359+
// If the type being pushed is a lua error, Raise a error
359360
#ifndef LAPI_GDEXTENSION
360361
if (LuaError *err = Object::cast_to<LuaError>(var.operator Object *()); err != nullptr) {
361362
#else
@@ -399,7 +400,7 @@ LuaError *LuaState::pushVariant(lua_State *state, Variant var) {
399400
}
400401
#endif
401402

402-
// If the type being pushed is a LuaCallableExtra. use mt_CallableExtra instead
403+
// If the type being pushed is a LuaCallableExtra. use mt_CallableExtra instead
403404
#ifndef LAPI_GDEXTENSION
404405
if (LuaCallableExtra *func = Object::cast_to<LuaCallableExtra>(var.operator Object *()); func != nullptr) {
405406
#else
@@ -893,12 +894,12 @@ void LuaState::luaHook(lua_State *state, lua_Debug *ar) {
893894
return;
894895
}
895896

896-
#ifndef LAPI_GDEXTENSION
897897
Array args;
898898
args.append(Ref<LuaAPI>(api));
899899
args.append(ar->event);
900900
args.append(ar->currentline);
901901

902+
#ifndef LAPI_GDEXTENSION
902903
const int argc = 3;
903904
const Variant *p_args[argc];
904905
for (int i = 0; i < argc; i++) {
@@ -925,11 +926,6 @@ void LuaState::luaHook(lua_State *state, lua_Debug *ar) {
925926
lua_error(state);
926927
}
927928
#else
928-
Array args;
929-
args.append(Ref<LuaAPI>(api));
930-
args.append(ar->event);
931-
args.append(ar->currentline);
932-
933929
Variant returned = hook.callv(args);
934930

935931
LuaError *err = LuaState::pushVariant(state, returned);

0 commit comments

Comments
 (0)