summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-12-13 11:20:26 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-12-13 11:20:26 +0000
commit98b38818d5618fce1e1cf6e95a924e206249eb42 (patch)
treefe9f1689584277105855987d376ca8692490bfdb /Build/source/texk/web2c
parent98b3e920b0a94a24517b8ccede04d1a9a3cc9c3f (diff)
kpathsea: Resolve remaining const related problems
web2c, ptexenc: Adapt git-svn-id: svn://tug.org/texlive/trunk@28521 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r--Build/source/texk/web2c/luatexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/lkpselib.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog
index 979392e7942..526f104c48f 100644
--- a/Build/source/texk/web2c/luatexdir/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/ChangeLog
@@ -1,5 +1,9 @@
2012-11-20 Peter Breitenlohner <peb@mppmu.mpg.de>
+ * lua/lkpselib.c: Use kpse_readable_file() with non-const arg.
+
+2012-11-20 Peter Breitenlohner <peb@mppmu.mpg.de>
+
* lua/lepdflib.cc: No need to test for Annot::decRefCnt with
poppler 0.18 or better.
diff --git a/Build/source/texk/web2c/luatexdir/lua/lkpselib.c b/Build/source/texk/web2c/luatexdir/lua/lkpselib.c
index 11283167ec0..6a64799771a 100644
--- a/Build/source/texk/web2c/luatexdir/lua/lkpselib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/lkpselib.c
@@ -764,17 +764,19 @@ static int lua_kpse_version(lua_State * L)
static int readable_file(lua_State * L)
{
- const char *name = luaL_checkstring(L, 1);
+ char *name = xstrdup(luaL_checkstring(L, 1));
TEST_PROGRAM_NAME_SET;
lua_pushstring(L, kpse_readable_file(name));
+ free(name);
return 1;
}
static int lua_kpathsea_readable_file(lua_State * L)
{
kpathsea *kp = (kpathsea *) luaL_checkudata(L, 1, KPATHSEA_METATABLE);
- const char *name = luaL_checkstring(L, 2);
+ char *name = xstrdup(luaL_checkstring(L, 2));
lua_pushstring(L, kpathsea_readable_file(*kp, name));
+ free(name);
return 1;
}