From e8335806afc45e31157937b880ff39b75c14a2cd Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Fri, 4 Oct 2013 12:04:39 +0000 Subject: GuString is now an ordinary C string - it makes live easier. In addition PgfSymbolKS, PgfExprFun and PgfLiteralStr now keep their strings as embedded flexible arrays. The latest change gives us the same compactness as the old representation but it is a lot easier to use. --- src/runtime/c/pgf/data.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/runtime/c/pgf/data.c') diff --git a/src/runtime/c/pgf/data.c b/src/runtime/c/pgf/data.c index 905857e1b..79cd3e8a2 100644 --- a/src/runtime/c/pgf/data.c +++ b/src/runtime/c/pgf/data.c @@ -15,7 +15,7 @@ pgf_tokens_equal(PgfTokens* t1, PgfTokens* t2) for (size_t i = 0; i < len1; i++) { GuString s1 = gu_seq_get(t1, PgfToken, i); GuString s2 = gu_seq_get(t2, PgfToken, i); - if (!gu_string_eq(s1, s2)) { + if (strcmp(s1, s2) != 0) { return false; } } @@ -51,7 +51,9 @@ GU_DEFINE_TYPE(PgfMetaChildMap, GuMap, GU_DEFINE_TYPE(PgfAbsCat, abstract); +static GuString empty_string = ""; + GU_DEFINE_TYPE( - PgfPrintNames, PgfCIdMap, gu_type(GuString), &gu_empty_string); + PgfPrintNames, PgfCIdMap, gu_type(GuString), &empty_string); GU_DEFINE_TYPE(PgfConcr, abstract); -- cgit v1.2.3