vala r2186 - in trunk: . gobject vapi
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2186 - in trunk: . gobject vapi
- Date: Tue, 16 Dec 2008 20:22:02 +0000 (UTC)
Author: juergbi
Date: Tue Dec 16 20:22:02 2008
New Revision: 2186
URL: http://svn.gnome.org/viewvc/vala?rev=2186&view=rev
Log:
2008-12-16 JÃrg Billeter <j bitron ch>
* gobject/valaccodebasemodule.vala:
* vapi/glib-2.0.vapi:
Fix GByteArray binding, patch by Evan Nemerson, fixes bug 561867
Modified:
trunk/ChangeLog
trunk/gobject/valaccodebasemodule.vala
trunk/vapi/glib-2.0.vapi
Modified: trunk/gobject/valaccodebasemodule.vala
==============================================================================
--- trunk/gobject/valaccodebasemodule.vala (original)
+++ trunk/gobject/valaccodebasemodule.vala Tue Dec 16 20:22:02 2008
@@ -112,6 +112,7 @@
public Class gslist_type;
public TypeSymbol gstringbuilder_type;
public TypeSymbol garray_type;
+ public TypeSymbol gbytearray_type;
public DataType gquark_type;
public Struct gvalue_type;
public Struct mutex_type;
@@ -574,6 +575,7 @@
gslist_type = (Class) glib_ns.scope.lookup ("SList");
gstringbuilder_type = (TypeSymbol) glib_ns.scope.lookup ("StringBuilder");
garray_type = (TypeSymbol) glib_ns.scope.lookup ("Array");
+ gbytearray_type = (TypeSymbol) glib_ns.scope.lookup ("ByteArray");
gquark_type = new ValueType ((TypeSymbol) glib_ns.scope.lookup ("Quark"));
gvalue_type = (Struct) glib_ns.scope.lookup ("Value");
@@ -1757,7 +1759,8 @@
/* set freed references to NULL to prevent further use */
var ccomma = new CCodeCommaExpression ();
- if (type.data_type == gstringbuilder_type || type.data_type == garray_type) {
+ if (type.data_type == gstringbuilder_type
+ || type.data_type == garray_type || type.data_type == gbytearray_type) {
ccall.add_argument (new CCodeConstant ("TRUE"));
} else if (type is ArrayType) {
var array_type = (ArrayType) type;
Modified: trunk/vapi/glib-2.0.vapi
==============================================================================
--- trunk/vapi/glib-2.0.vapi (original)
+++ trunk/vapi/glib-2.0.vapi Tue Dec 16 20:22:02 2008
@@ -3012,8 +3012,19 @@
/* Byte Arrays */
[Compact]
- [CCode (free_function = "g_byte_array_free")]
+ [CCode (cprefix = "g_byte_array_", free_function = "g_byte_array_free")]
public class ByteArray {
+ public ByteArray ();
+ [CCode (cname = "g_byte_array_sized_new")]
+ public ByteArray.sized (uint reserved_size);
+ public void append (uint8[] data);
+ public void prepend (uint8[] data);
+ public void remove_index (uint index);
+ public void remove_index_fast (uint index);
+ public void remove_range (uint index, uint length);
+ public void sort (CompareFunc compare_func);
+ public void sort_with_data (CompareDataFunc compare_func);
+ public void set_size (uint length);
}
/* N-ary Trees */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]