texlive[62281] Build/source/texk/web2c/luatexdir: LuaTeX: pass node

commits+lscarso at tug.org commits+lscarso at tug.org
Mon Feb 28 20:21:34 CET 2022


Revision: 62281
          http://tug.org/svn/texlive?view=revision&revision=62281
Author:   lscarso
Date:     2022-02-28 20:21:33 +0100 (Mon, 28 Feb 2022)
Log Message:
-----------
LuaTeX: pass node to latelua function call (H.Hagen).

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/luatexdir/ChangeLog
    trunk/Build/source/texk/web2c/luatexdir/lua/luastuff.c
    trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h

Modified: trunk/Build/source/texk/web2c/luatexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/ChangeLog	2022-02-28 17:00:54 UTC (rev 62280)
+++ trunk/Build/source/texk/web2c/luatexdir/ChangeLog	2022-02-28 19:21:33 UTC (rev 62281)
@@ -1,3 +1,6 @@
+2022-02-28 Luigi Scarso <luigi.scarso at gmail.com>
+    * pass node to latelua function call (H.Hagen)
+
 2022-02-27 Luigi Scarso <luigi.scarso at gmail.com>
     * Development id also with --version.
 

Modified: trunk/Build/source/texk/web2c/luatexdir/lua/luastuff.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/lua/luastuff.c	2022-02-28 17:00:54 UTC (rev 62280)
+++ trunk/Build/source/texk/web2c/luatexdir/lua/luastuff.c	2022-02-28 19:21:33 UTC (rev 62281)
@@ -442,7 +442,7 @@
     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 @@
             /*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 @@
     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. */
     }

Modified: trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h	2022-02-28 17:00:54 UTC (rev 62280)
+++ trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h	2022-02-28 19:21:33 UTC (rev 62281)
@@ -1,4 +1,4 @@
 #ifndef luatex_svn_revision_h
 #define luatex_svn_revision_h
-#define luatex_svn_revision 7501
+#define luatex_svn_revision 7503
 #endif



More information about the tex-live-commits mailing list.