diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-03-29 11:38:40 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-03-29 11:38:40 +0000 |
commit | bbe0fa38214d69f398e4f6de75453ca1b99df772 (patch) | |
tree | bf52db5dc29fe0a138fe54022174f1cbf8dceda5 /Build/source/texk/web2c | |
parent | cd703703903b866f4b023ca4b5956ce14d77cd13 (diff) |
LuaTeX: Avoid casting const to non-const
git-svn-id: svn://tug.org/texlive/trunk@33320 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/pdf/pdfgen.h | 1 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/pdf/pdfgen.w | 6 |
3 files changed, 8 insertions, 4 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog index 7839bd2f8d0..cdb91b74747 100644 --- a/Build/source/texk/web2c/luatexdir/ChangeLog +++ b/Build/source/texk/web2c/luatexdir/ChangeLog @@ -1,3 +1,8 @@ +2014-03-29 Peter Breitenlohner <peb@mppmu.mpg.de> + + * pdf/pdfgen.[hw]: Declare get_pdf_table_string() as + 'static const char *'. + 2014-03-29 Taco Hoekwater <taco@luatex.org> Import LuaTeX 0.79.1 from LuaTeX repository (released) diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.h b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.h index 9e2bee44f99..225ac6045e7 100644 --- a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.h +++ b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.h @@ -197,7 +197,6 @@ extern char *get_resname_prefix(PDF); extern void pdf_begin_page(PDF pdf); extern void pdf_end_page(PDF pdf); extern void print_pdf_table_string(PDF pdf, const char *s); -extern char *get_pdf_table_string(const char *s); extern int get_pdf_table_bool(PDF, const char *, int); extern void fix_o_mode(PDF pdf); diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w index 2854d5c671e..0f312f2c781 100644 --- a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w +++ b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w @@ -1901,7 +1901,7 @@ void print_pdf_table_string(PDF pdf, const char *s) } @ @c -char *get_pdf_table_string(const char *s) +static const char *get_pdf_table_string(const char *s) { const_lstring ls; lua_rawgeti(Luas, LUA_REGISTRYINDEX, lua_key_index(pdf_data)); @@ -1911,7 +1911,7 @@ char *get_pdf_table_string(const char *s) if (lua_isstring(Luas, -1)) { /* s t ... */ ls.s = lua_tolstring(Luas, -1, &ls.l); lua_pop(Luas, 2); /* ... */ - return (char *)ls.s; + return ls.s; } lua_pop(Luas, 2); /* ... */ return NULL ; @@ -2265,7 +2265,7 @@ static int pdf_print_info(PDF pdf, int luatexversion, boolean creator_given, producer_given, creationdate_given, moddate_given, trapped_given; char *s = NULL; - char *p = NULL; + const char *p = NULL; int k, len = 0; k = pdf_create_obj(pdf, obj_type_info, 0); pdf_begin_obj(pdf, k, 3); /* keep Info readable unless explicitely forced */ |