[libgda] SqlParser: added header by default (backported from 5.2 branch)
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] SqlParser: added header by default (backported from 5.2 branch)
- Date: Thu, 10 Oct 2019 14:03:34 +0000 (UTC)
commit 625fd9d30af06a8a5f4d3c8882cb1940bd79bc3c
Author: Daniel Espinosa <esodan gmail com>
Date: Thu Oct 10 09:03:03 2019 -0500
SqlParser: added header by default (backported from 5.2 branch)
libgda/libgda.h.in | 2 ++
tests/value-holders/common.c | 67 --------------------------------------------
2 files changed, 2 insertions(+), 67 deletions(-)
---
diff --git a/libgda/libgda.h.in b/libgda/libgda.h.in
index 830ceda07..ce652ad09 100644
--- a/libgda/libgda.h.in
+++ b/libgda/libgda.h.in
@@ -86,6 +86,8 @@
#include <libgda/gda-db-catalog.h>
+#include <libgda/sql-parser/gda-sql-parser.h>
+
G_BEGIN_DECLS
/**
diff --git a/tests/value-holders/common.c b/tests/value-holders/common.c
index 8f4a8a13c..0700811fc 100644
--- a/tests/value-holders/common.c
+++ b/tests/value-holders/common.c
@@ -20,8 +20,6 @@
#include <json-glib/json-glib.h>
#endif
-static gchar *_json_quote_string (const gchar *str);
-
void
tests_common_display_value (const gchar *prefix, const GValue *value)
{
@@ -226,71 +224,6 @@ tests_common_set_serialize (GdaSet *set)
return str;
}
-gchar *
-_json_quote_string (const gchar *str)
-{
- gchar *retval, *rptr;
- const gchar *sptr;
- gint len;
-
- if (!str)
- return g_strdup ("null");
-
- len = strlen (str);
- retval = g_new (gchar, 2*len + 3);
- *retval = '"';
- for (rptr = retval+1, sptr = str; *sptr; sptr++, rptr++) {
- switch (*sptr) {
- case '"':
- *rptr = '\\';
- rptr++;
- *rptr = *sptr;
- break;
- case '\\':
- *rptr = '\\';
- rptr++;
- *rptr = *sptr;
- break;
- case '/':
- *rptr = '\\';
- rptr++;
- *rptr = *sptr;
- break;
- case '\b':
- *rptr = '\\';
- rptr++;
- *rptr = 'b';
- break;
- case '\f':
- *rptr = '\\';
- rptr++;
- *rptr = 'f';
- break;
- case '\n':
- *rptr = '\\';
- rptr++;
- *rptr = 'n';
- break;
- case '\r':
- *rptr = '\\';
- rptr++;
- *rptr = 'r';
- break;
- case '\t':
- *rptr = '\\';
- rptr++;
- *rptr = 't';
- break;
- default:
- *rptr = *sptr;
- break;
- }
- }
- *rptr = '"';
- rptr++;
- *rptr = 0;
- return retval;
-}
/*
* Loads @filename where each line (terminated by a '\n') is in the form <id>|<text>, and lines starting
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]