[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdebindings/qtruby/rubylib/qtruby
From: Richard Dale <Richard_Dale () tipitina ! demon ! co ! uk>
Date: 2005-10-03 9:40:49
Message-ID: 1128332449.324093.26242.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 466701 by rdale:
* Oops, a recent fix for QByteArray marshalling didn't compile
M +3 -3 handlers.cpp
--- branches/KDE/3.5/kdebindings/qtruby/rubylib/qtruby/handlers.cpp #466700:466701
@@ -910,18 +910,18 @@
Data_Get_Struct(data, QByteArray, s);
} else {
// Or a ruby String inside
- s = new QByteArray(RSTRING(data)->len, '\0');
+ s = new QByteArray(RSTRING(data)->len);
memcpy((void*)s->data(), StringValuePtr(data), RSTRING(data)->len);
VALUE data = Data_Wrap_Struct(rb_cObject, 0, 0, s);
rb_funcall(qt_internal_module, rb_intern("set_qbytearray"), 2, rv, data);
}
} else {
// Ordinary ruby String - use the contents of the string
- s = new QByteArray(RSTRING(rv)->len, '\0');
+ s = new QByteArray(RSTRING(rv)->len);
memcpy((void*)s->data(), StringValuePtr(rv), RSTRING(rv)->len);
}
} else {
- s = new QByteArray(0, '\0');
+ s = new QByteArray(0);
}
m->item().s_voidp = s;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic