[Kde-bindings] KDE/kdebindings/ruby/qtruby

Richard Dale Richard_Dale at tipitina.demon.co.uk
Fri Dec 12 16:36:48 UTC 2008


SVN commit 896140 by rdale:

* Revert the recent change for marshalling 'unsigned char*' types which
  expected them to be null terminated. After more thought it is pretty
  likely they won't be null terminated because if they were they would
  have been defined as just 'char *' instead. It better to have a clear
  message saying they aren't supported and need special casing, rather
  than needing to track down possible random buggy effects.

CCMAIL: kde-bindings at kde.org



 M  +6 -0      ChangeLog  
 M  +1 -11     src/marshall_basetypes.h  


--- trunk/KDE/kdebindings/ruby/qtruby/ChangeLog #896139:896140
@@ -3,6 +3,12 @@
 	  types prefer the non-const version of the arg. Thanks to Davor Ocelic
 	  for explaining why this was a good idea in the case of the Qt::Image
 	  constructors.
+	* Revert the recent change for marshalling 'unsigned char*' types which
+	  expected them to be null terminated. After more thought it is pretty
+	  likely they won't be null terminated because if they were they would
+	  have been defined as just 'char *' instead. It better to have a clear
+	  message saying they aren't supported and need special casing, rather
+	  than needing to track down possible random buggy effects.
 
 2008-12-11  Richard Dale  <richard.j.dale at gmail.com>
 	* Make some changes from the patch at 
--- trunk/KDE/kdebindings/ruby/qtruby/src/marshall_basetypes.h #896139:896140
@@ -200,17 +200,7 @@
 template <>
 void marshall_to_ruby<unsigned char *>(Marshall *m)
 {
-	char * sv = (char *)m->item().s_voidp;
-	VALUE obj;
-	if (sv != 0)
-		obj = rb_str_new2(sv);
-	else
-		obj = Qnil;
-
-	if (m->cleanup())
-		delete[] sv;
-
-	*(m->var()) = obj;
+	m->unsupported();
 }
 
 #endif



More information about the Kde-bindings mailing list