[libgdamm/libgdamm-4-2] Value::set_binary(): reinit the type.



commit d74699de9984aa8b2cdd1339995e9034238edd6e
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Sep 21 08:46:25 2011 +0200

    Value::set_binary(): reinit the type.
    
    * libgda/libgdamm/value.cc: Call value_reinit(), as we do in other set()
    methods.

 ChangeLog                |    7 +++++++
 libgda/libgdamm/value.cc |    2 ++
 2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6aa29d6..c9c6d9e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,13 @@
 	unsets the src, because it is the same gobject, and then we reject that
 	src as invalid.
 
+2011-09-21  Murray Cumming  <murrayc murrayc com>
+
+	Value::set_binary(): reinit the type.
+
+	* libgda/libgdamm/value.cc: Call value_reinit(), as we do in other set()
+	methods.
+
 4.1.2:
 
 2011-01-30  Murray Cumming  <murrayc murrayc com>
diff --git a/libgda/libgdamm/value.cc b/libgda/libgdamm/value.cc
index 69e4c5d..be143f0 100644
--- a/libgda/libgdamm/value.cc
+++ b/libgda/libgdamm/value.cc
@@ -296,6 +296,8 @@ const guchar* Value::get_binary(long& size) const
 
 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]