[Kde-bindings] KDE/kdebindings/ruby/qtruby
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Sun Jul 13 09:19:53 UTC 2008
SVN commit 831748 by rdale:
* Remove the smoke2kross() function as it isn't needed anymore. Change
the kross2smoke() function so that it assumes Kross will return a
pointer to a pointer, instead of just a pointer to the C++ instance.
CCMAIL: kde-bindings at kde.org
M +6 -0 ChangeLog
M +3 -12 src/Qt.cpp
M +0 -1 src/qtruby.cpp
M +0 -1 src/qtruby.h
--- trunk/KDE/kdebindings/ruby/qtruby/ChangeLog #831747:831748
@@ -1,3 +1,9 @@
+2008-07-13 Richard Dale <richard.j.dale at gmail.com>
+
+ * Remove the smoke2kross() function as it isn't needed anymore. Change
+ the kross2smoke() function so that it assumes Kross will return a
+ pointer to a pointer, instead of just a pointer to the C++ instance.
+
2008-07-12 Richard Dale <richard.j.dale at gmail.com>
* Change the layout of the smokeruby_object struct so that the ptr to
--- trunk/KDE/kdebindings/ruby/qtruby/src/Qt.cpp #831747:831748
@@ -1175,10 +1175,10 @@
rb_raise(rb_eArgError, "unable to find class \"%s\" to cast to\n", StringValuePtr(new_klassname));
}
- void* o;
- Data_Get_Struct(krobject, void, o);
+ void** o;
+ Data_Get_Struct(krobject, void*, o);
- smokeruby_object * o_cast = alloc_smokeruby_object(false, cast_to_id->smoke, (int) cast_to_id->index, o);
+ smokeruby_object * o_cast = alloc_smokeruby_object(false, cast_to_id->smoke, (int) cast_to_id->index, *o);
VALUE obj = Data_Wrap_Struct(new_klass, smokeruby_mark, smokeruby_free, (void *) o_cast);
mapPointer(obj, o_cast, o_cast->classId, 0);
@@ -1186,15 +1186,6 @@
}
VALUE
-smoke2kross(VALUE /* self*/, VALUE sobj)
-{
- smokeruby_object * o;
- Data_Get_Struct(sobj, smokeruby_object, o);
-
- return Data_Wrap_Struct(rb_cObject, 0, 0, o->ptr );
-}
-
-VALUE
qvariant_value(VALUE /*self*/, VALUE variant_value_klass, VALUE variant_value)
{
const char * classname = rb_class2name(variant_value_klass);
--- trunk/KDE/kdebindings/ruby/qtruby/src/qtruby.cpp #831747:831748
@@ -1988,7 +1988,6 @@
rb_define_module_function(qt_internal_module, "create_qobject_class", (VALUE (*) (...)) create_qobject_class, 2);
rb_define_module_function(qt_internal_module, "cast_object_to", (VALUE (*) (...)) cast_object_to, 2);
rb_define_module_function(qt_internal_module, "kross2smoke", (VALUE (*) (...)) kross2smoke, 2);
- rb_define_module_function(qt_internal_module, "smoke2kross", (VALUE (*) (...)) smoke2kross, 1);
rb_define_module_function(qt_internal_module, "set_qtruby_embedded", (VALUE (*) (...)) set_qtruby_embedded_wrapped, 1);
rb_define_module_function(qt_internal_module, "application_terminated=", (VALUE (*) (...)) set_application_terminated, 1);
--- trunk/KDE/kdebindings/ruby/qtruby/src/qtruby.h #831747:831748
@@ -149,7 +149,6 @@
extern Q_DECL_EXPORT VALUE set_obj_info(const char * className, smokeruby_object * o);
extern Q_DECL_EXPORT VALUE cast_object_to(VALUE self, VALUE object, VALUE new_klass);
extern Q_DECL_EXPORT VALUE kross2smoke(VALUE self, VALUE krobject, VALUE new_klass);
-extern Q_DECL_EXPORT VALUE smoke2kross(VALUE self, VALUE sobj);
extern Q_DECL_EXPORT VALUE qvariant_value(VALUE self, VALUE variant_value_klass, VALUE variant_value);
extern Q_DECL_EXPORT VALUE qvariant_from_value(int argc, VALUE * argv, VALUE self);
extern Q_DECL_EXPORT const char* get_VALUEtype(VALUE ruby_value);
More information about the Kde-bindings
mailing list