Rename sync functions and drop redundant GetMarkerDef
Rename SetMarkerDef → SetMarkerSync, ClearMarkerDef → ClearMarkerSync to clarify their purpose. Remove GetMarkerDef from the table since GetWorldMarker is now a public global.
This commit is contained in:
+3
-4
@@ -103,11 +103,10 @@ fn registerLuaFunctions() void {
|
||||
registerFunction("GetWorldMarker", @intFromPtr(&markers.luaGetWorldMarker));
|
||||
registerFunction("CanSetWorldMarker", @intFromPtr(&markers.luaCanSetMarkers));
|
||||
|
||||
// Internal functions in WorldMarkers table (via luaL_openlib)
|
||||
// Sync functions in WorldMarkers table (used by addon message handler)
|
||||
const lib = [_]lua.LuaReg{
|
||||
.{ .name = "SetMarkerDef", .func = @intFromPtr(&markers.luaSetMarkerDef) },
|
||||
.{ .name = "ClearMarkerDef", .func = @intFromPtr(&markers.luaClearMarkerDef) },
|
||||
.{ .name = "GetMarkerDef", .func = @intFromPtr(&markers.luaGetMarkerDef) },
|
||||
.{ .name = "SetMarkerSync", .func = @intFromPtr(&markers.luaSetMarkerDef) },
|
||||
.{ .name = "ClearMarkerSync", .func = @intFromPtr(&markers.luaClearMarkerDef) },
|
||||
.{ .name = null, .func = 0 }, // sentinel
|
||||
};
|
||||
lua.openlib(lua.getContext(), "WorldMarkers", &lib, 0);
|
||||
|
||||
Reference in New Issue
Block a user