[libgdamm] SqlBuilder: Don't pass empty strings to the C functions.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdamm] SqlBuilder: Don't pass empty strings to the C functions.
- Date: Mon, 17 May 2010 14:24:57 +0000 (UTC)
commit e2eb3ae7672a67519788e21921c4406b1cd85b25
Author: Murray Cumming <murrayc murrayc com>
Date: Mon May 17 16:24:51 2010 +0200
SqlBuilder: Don't pass empty strings to the C functions.
* libgda/src/sqlbuilder.hg: Make sure that generated methods pass NULL
for empty strings, because libgda does not always check that strings are
not empty, though I try to fix that in libgda when I see it.
ChangeLog | 12 ++++++++++--
libgda/src/sqlbuilder.hg | 2 ++
tools/m4/convert_libgdamm.m4 | 1 -
3 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 98dc68f..78f02f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,16 @@
+2010-05-17 Murray Cumming <murrayc murrayc com>
+
+ SqlBuilder: Don't pass empty strings to the C functions.
+
+ * libgda/src/sqlbuilder.hg: Make sure that generated methods pass NULL
+ for empty strings, because libgda does not always check that strings are
+ not empty, though I try to fix that in libgda when I see it.
+
2010-05-13 Murray Cumming <murrayc murrayc com>
SqlBuilder: get_sql_statement(): Fix memory management.
-
- * libgda/src/sqlbuilder.hg: get_sql_statement(): Take a copy of the C object,
+
+ * libgda/src/sqlbuilder.hg: get_sql_statement(): Take a copy of the C object,
to avoid a double-free.
2010-05-12 Murray Cumming <murrayc murrayc com>
diff --git a/libgda/src/sqlbuilder.hg b/libgda/src/sqlbuilder.hg
index d4fc43f..29d2b99 100644
--- a/libgda/src/sqlbuilder.hg
+++ b/libgda/src/sqlbuilder.hg
@@ -48,6 +48,8 @@ protected:
public:
_WRAP_CREATE(SqlStatementType type)
+#m4 _CONVERSION(`const Glib::ustring& ', `const gchar*', `string_or_null($3)')
+
_WRAP_METHOD(Glib::RefPtr<Statement> get_statement() const, gda_sql_builder_get_statement, errthrow)
#m4 _CONVERSION(`GdaSqlStatement*', `SqlStatement', `Glib::wrap($3, true /* take_copy */)')
diff --git a/tools/m4/convert_libgdamm.m4 b/tools/m4/convert_libgdamm.m4
index f049969..8ed27c0 100644
--- a/tools/m4/convert_libgdamm.m4
+++ b/tools/m4/convert_libgdamm.m4
@@ -158,4 +158,3 @@ _CONVERSION(`const SqlExpr&', `GdaSqlExpr*', `const_cast<GdaSqlExpr*>(($3).gobj(
_CONVERSION(`GdaSqlExpr*', `SqlExpr', `Glib::wrap($3)')
_CONVERSION(`const SqlStatement&', `GdaSqlStatement*', `const_cast<GdaSqlStatement*>(($3).gobj())')
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]