summaryrefslogtreecommitdiff
path: root/source/luametatex/source/tex/texstringpool.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/luametatex/source/tex/texstringpool.c')
-rw-r--r--source/luametatex/source/tex/texstringpool.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/luametatex/source/tex/texstringpool.c b/source/luametatex/source/tex/texstringpool.c
index 8367447da..fd93758b5 100644
--- a/source/luametatex/source/tex/texstringpool.c
+++ b/source/luametatex/source/tex/texstringpool.c
@@ -435,6 +435,7 @@ char *tex_makeclstring(int s, size_t *len)
}
}
+/*
char *tex_makecstring(int s)
{
if (s < cs_offset_value) {
@@ -443,6 +444,23 @@ char *tex_makecstring(int s)
return lmt_memory_strdup((str_length(s) > 0) ? (const char *) str_string(s) : "");
}
}
+*/
+
+/*tex
+ I might eventually replace this because in qite some calls we know that we knwo that we have
+ a pointer in string space. We can kin dof predict in what cases we are below |cs_offset_value|
+ anyway.
+*/
+
+char *tex_makecstring(int s, int *allocated)
+{
+ *allocated = s < cs_offset_value;
+ if (*allocated) {
+ return (char *) aux_uni2str((unsigned) s);
+ } else {
+ return str_length(s) > 0 ? (char *) str_string(s) : "";
+ }
+}
/*tex