Skip to content
Snippets Groups Projects
Commit 6438d314 authored by Luigi Scarso's avatar Luigi Scarso
Browse files

sync with experimental

parent 553a9fa5
No related branches found
No related tags found
No related merge requests found
......@@ -890,6 +890,10 @@ The difference between \type {data} and \type {string} is that on assignment, th
\type {data} field is converted to a token list, cf.\ use as \lpr {latelua}. The
\type {string} version is treated as a literal string.
When a function is used, it gets called with as first argument the node that triggers
the call.
\stopsection
\startsection[title={\DVI\ backend whatsits}]
......
No preview for this file type
......@@ -442,7 +442,7 @@ int lua_traceback(lua_State * L)
return 1;
}
static void luacall(int p, int nameptr, boolean is_string)
static void luacall(int p, int nameptr, boolean is_string, halfword w)
{
LoadS ls;
int i;
......@@ -466,7 +466,8 @@ static void luacall(int p, int nameptr, boolean is_string)
/*tex put it under chunk */
lua_insert(Luas, base);
++late_callback_count;
i = lua_pcall(Luas, 0, 0, base);
lua_nodelib_push_fast(Luas, w);
i = lua_pcall(Luas, 1, 0, base);
/*tex remove traceback function */
lua_remove(Luas, base);
if (i != 0) {
......@@ -600,12 +601,12 @@ void late_lua(PDF pdf, halfword p)
if (t == normal) {
/*tex sets |def_ref| */
expand_macros_in_tokenlist(p);
luacall(def_ref, late_lua_name(p), false);
luacall(def_ref, late_lua_name(p), false, p);
flush_list(def_ref);
} else if (t == lua_refid_call) {
luafunctioncall(late_lua_data(p));
} else if (t == lua_refid_literal) {
luacall(late_lua_data(p), late_lua_name(p), true);
luacall(late_lua_data(p), late_lua_name(p), true, p);
} else {
/*tex Let's just ignore it, could be some user specific thing. */
}
......
#ifndef luatex_svn_revision_h
#define luatex_svn_revision_h
#define luatex_svn_revision 7501
#define luatex_svn_revision 7503
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment