+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
+
2008-12-16 Jürg Billeter <j@bitron.ch>
* vapi/packages/gdk-pixbuf-2.0/:
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;
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");
/* 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;
/* 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 */