texlive[46569] Build/source/texk/web2c/mfluadir: MFLua 0.9. Fixed a
commits+lscarso at tug.org
commits+lscarso at tug.org
Thu Feb 8 10:31:53 CET 2018
Revision: 46569
http://tug.org/svn/texlive?view=revision&revision=46569
Author: lscarso
Date: 2018-02-08 10:31:53 +0100 (Thu, 08 Feb 2018)
Log Message:
-----------
MFLua 0.9. Fixed a memory leak in runscript.
Modified Paths:
--------------
trunk/Build/source/texk/web2c/mfluadir/ChangeLog
trunk/Build/source/texk/web2c/mfluadir/mf-lua.ch
trunk/Build/source/texk/web2c/mfluadir/mflua_version.h
trunk/Build/source/texk/web2c/mfluadir/mfluac.c
Property Changed:
----------------
trunk/Build/source/
Index: trunk/Build/source
===================================================================
--- trunk/Build/source 2018-02-08 01:18:00 UTC (rev 46568)
+++ trunk/Build/source 2018-02-08 09:31:53 UTC (rev 46569)
Property changes on: trunk/Build/source
___________________________________________________________________
Modified: svn:ignore
## -1,3 +1 ##
-inst
-Work
autom4te.cache
Modified: trunk/Build/source/texk/web2c/mfluadir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/mfluadir/ChangeLog 2018-02-08 01:18:00 UTC (rev 46568)
+++ trunk/Build/source/texk/web2c/mfluadir/ChangeLog 2018-02-08 09:31:53 UTC (rev 46569)
@@ -1,3 +1,10 @@
+2018-02-08 Luigi Scarso <luigi.scarso at gmail.com>
+
+ * MFLua 0.9.
+ * Fixed a bug on clean up string in runscript.
+
+
+
2017-04-16 Luigi Scarso <luigi.scarso at gmail.com>
* MFLua 0.8. New primitive runscript, cleanup of the Lua code.
Modified: trunk/Build/source/texk/web2c/mfluadir/mf-lua.ch
===================================================================
--- trunk/Build/source/texk/web2c/mfluadir/mf-lua.ch 2018-02-08 01:18:00 UTC (rev 46568)
+++ trunk/Build/source/texk/web2c/mfluadir/mf-lua.ch 2018-02-08 09:31:53 UTC (rev 46569)
@@ -2,7 +2,7 @@
% This program is copyright (C) 1984 by D. E. Knuth; all rights are reserved.
@y
% This program is MFLua, strictly based on the METAFONT 2.7182818 source code.
-% What follow are the original comments of METAFONT 2.7182818.
+% What follow are the original comments of METAFONT 2.7182818.
% This program is copyright (C) 1984 by D. E. Knuth; all rights are reserved.
@z
@@ -19,7 +19,7 @@
@y
@d METAFONT_banner=='This is METAFONT, Version 2.7182818' {printed when \MF\ starts}
@#
- at d MFLua_version_string=='-0.8'
+ at d MFLua_version_string=='-0.9'
@#
@d MFLua_banner=='This is MFLua, Version 2.7182818', MFLua_version_string
{printed when MFLua starts}
@@ -496,17 +496,6 @@
@ @<As for scantokens, pretend we're reading a new one-line file@>=
begin {begin\_file\_reading;} name:=2; {should be name:=3 but for the moment we keep 2}
k:=first+length(cur_exp);
-{print(" k=");print\_int(k);print\_ln;}
-{print(" first=");print\_int(first);print\_ln;}
-{print(" length(cur\_exp)=");print\_int(length(cur\_exp));print\_ln;}
-{ Will be removed as soon as we have tested that it's ok}
-{if k>=max\_buf\_stack then}
-{ begin if k>=buf\_size then}
-{ begin max\_buf\_stack:=buf\_size;}
-{ overflow("buffer size",buf\_size);}
-{ end;}
-{ max\_buf\_stack:=k+1;}
-{ end;}
j:=str_start[cur_exp]; limit:=k;
mflua_runscript(j,first,limit);
lua_cur_exp:=make_string;
@@ -515,12 +504,6 @@
begin_file_reading;
add_str_ref(lua_cur_exp);
j:=str_start[lua_cur_exp]; k:=first+length(lua_cur_exp);limit:=k;
-{ Will be removed as soon as we have tested that it's ok}
-{print("=============BEGIN TEST===============");print\_ln;}
-{print(" k=");print\_int(k);print\_ln;}
-{print(" first=");print\_int(first);print\_ln;}
-{print(" limit=");print\_int(limit);print\_ln;}
-{print(" length(lua\_cur\_exp)=");print\_int(length(lua\_cur\_exp));print\_ln;}
if k>=max_buf_stack then
begin if k>=buf_size then
begin max_buf_stack:=buf_size;
@@ -535,9 +518,9 @@
buffer[first]:=so(str_pool[j]); {print(so(str\_pool[j]));} incr(j); incr(first);
end;
buffer[limit]:="%"; first:=limit+1; loc:=start;
- {print("=============END TEST=================");print\_ln;}
- delete_str_ref(lua_cur_exp);
+ {delete_str_ref(lua_cur_exp);}
end;
+delete_str_ref(lua_cur_exp);
flush_cur_exp(0);
end
@* \[51] System-dependent changes.
Modified: trunk/Build/source/texk/web2c/mfluadir/mflua_version.h
===================================================================
--- trunk/Build/source/texk/web2c/mfluadir/mflua_version.h 2018-02-08 01:18:00 UTC (rev 46568)
+++ trunk/Build/source/texk/web2c/mfluadir/mflua_version.h 2018-02-08 09:31:53 UTC (rev 46569)
@@ -1 +1 @@
-#define MFLUA_VERSION "0.8"
+#define MFLUA_VERSION "0.9"
Modified: trunk/Build/source/texk/web2c/mfluadir/mfluac.c
===================================================================
--- trunk/Build/source/texk/web2c/mfluadir/mfluac.c 2018-02-08 01:18:00 UTC (rev 46568)
+++ trunk/Build/source/texk/web2c/mfluadir/mfluac.c 2018-02-08 09:31:53 UTC (rev 46569)
@@ -1379,7 +1379,6 @@
/* end of a C string */
strpool[j+limit-first] = '\0';
str = (const char *)(strpool+j) ;
- /*fprintf(stderr,"\n! str=%s\n",str);*/
/* do the call (0 arguments, 1 result) */
error = (luaL_loadstring(L, str) || lua_pcall(L, 0, 1, 0)) ;
strpool[j+limit-first] = last_char;
More information about the tex-live-commits
mailing list