summaryrefslogtreecommitdiff
path: root/source/luametatex/source/lua/lmtcallbacklib.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/luametatex/source/lua/lmtcallbacklib.c')
-rw-r--r--source/luametatex/source/lua/lmtcallbacklib.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/luametatex/source/lua/lmtcallbacklib.c b/source/luametatex/source/lua/lmtcallbacklib.c
index a971b5e57..ec9788c13 100644
--- a/source/luametatex/source/lua/lmtcallbacklib.c
+++ b/source/luametatex/source/lua/lmtcallbacklib.c
@@ -54,6 +54,7 @@ static const char *callbacklib_names[total_callbacks] = {
"show_warning_message",
"hpack_quality",
"vpack_quality",
+ "show_break",
"insert_par",
"append_line_filter",
"build_page_insert",
@@ -307,7 +308,7 @@ static int callbacklib_aux_run(lua_State *L, int id, int special, const char *va
return tex_formatted_error("callback", "string expected, not: %s\n", lua_typename(L, t));
}
break;
- case callback_result_key:
+ case callback_result_s_key:
switch (t) {
case LUA_TNIL:
*va_arg(vl, int *) = 0;
@@ -342,6 +343,16 @@ static int callbacklib_aux_run(lua_State *L, int id, int special, const char *va
return tex_formatted_error("callback", "string, false or nil expected, not: %s\n", lua_typename(L, t));
}
break;
+ case callback_result_i_key:
+ switch (t) {
+ case LUA_TNUMBER:
+ *va_arg(vl, int *) = lmt_tointeger(L, nres);
+ break;
+ default:
+ /* *va_arg(vl, int *) = 0; */ /*tex We keep the value! */
+ break;
+ }
+ break;
default:
return tex_formatted_error("callback", "invalid value type returned\n");
}