[libgdamm] Adapt to GdaBinary API Change.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdamm] Adapt to GdaBinary API Change.
- Date: Mon, 14 Nov 2016 12:15:00 +0000 (UTC)
commit 7a5995d5c63c7de36489f9cd480a61e86e171da0
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Nov 14 13:12:14 2016 +0100
Adapt to GdaBinary API Change.
libgda/libgdamm/value.cc | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/libgda/libgdamm/value.cc b/libgda/libgdamm/value.cc
index 5829fe0..fbba312 100644
--- a/libgda/libgdamm/value.cc
+++ b/libgda/libgdamm/value.cc
@@ -308,18 +308,18 @@ const guchar* Value::get_binary(long& size) const
if(!gdabinary)
return 0;
- size = gdabinary->binary_length;
- return gdabinary->data;
+ size = gda_binary_get_size(const_cast<GdaBinary*>(gdabinary));
+ //TODO: gda_binary_get_data() returns gpointer. Should we too?
+ return (guchar*)gda_binary_get_data(const_cast<GdaBinary*>(gdabinary));
}
void Value::set(const guchar* val, long size)
{
value_reinit(gobj(), GDA_TYPE_BINARY);
-
- GdaBinary gdabinary;
- gdabinary.data = const_cast<guchar*>(val);
- gdabinary.binary_length = size;
- gda_value_set_binary(gobj(), &gdabinary);
+
+ GdaBinary* gdabinary = gda_binary_new();
+ gda_binary_set_data(gdabinary, const_cast<guchar*>(val), size);
+ gda_value_take_binary(gobj(), gdabinary);
}
const GdaBlob* Value::get_blob() const
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]