diff options
| author | t <t@tjp.lol> | 2026-06-23 09:38:23 -0600 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-06-23 10:53:26 -0600 |
| commit | 69a1ee138bb78ad4663fe2d9e58678f7b0d07b74 (patch) | |
| tree | 453d3ad42a07536220e6ca5d91b439ff57793e32 /src/lua_event_bridge.zig | |
| parent | 538a5d926fa626a00cc3dc12c555f11f82867efd (diff) | |
ponytail simplifications to panto cli and lua extensiosn
Diffstat (limited to 'src/lua_event_bridge.zig')
| -rw-r--r-- | src/lua_event_bridge.zig | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/lua_event_bridge.zig b/src/lua_event_bridge.zig index 26a4646..044dd55 100644 --- a/src/lua_event_bridge.zig +++ b/src/lua_event_bridge.zig @@ -670,13 +670,7 @@ fn cacheLines(cache: *RenderCache) []const []const u8 { /// C thunk installed as `panto.ext.emit` by the runtime (`installEmit`), /// carrying the `*EventBridge` as a light-userdata upvalue. Fires a custom -/// event on the native bus so native AND Lua handlers run. The `data` -/// argument is currently surfaced to handlers only as a `.custom` payload -/// (opaque); structured custom-data marshalling can be added later. The -/// chosen component (if any handler set one) is NOT auto-mounted here — -/// imperative mounting from a bare `emit` is a future refinement; for now -/// `emit` drives handler side effects and component selection for events -/// the app fires at real component-creation boundaries. +/// event on the native bus so native and Lua handlers run. pub fn emitThunk(L_opt: ?*c.lua_State) callconv(.c) c_int { const L = L_opt.?; const self_ptr = c.lua_touserdata(L, c.lua_upvalueindex(1)); @@ -689,7 +683,7 @@ pub fn emitThunk(L_opt: ?*c.lua_State) callconv(.c) c_int { if (nptr == null) return c.luaL_error(L, "emit: first argument must be an event name string"); const name = nptr[0..nlen]; - var ev = Event.init(name, null, .{ .custom = .{} }); + var ev = Event.init(name, null, .{ .custom = {} }); _ = bus.emit(&ev); return 0; } |
