@@ -203,7 +203,7 @@ public static int object_set_from_string(Arena arena, MemorySegment object, Stri
203
203
/// ```c
204
204
/// void *vips_type_map(GType base, VipsTypeMap2Fn fn, void *a, void *b)
205
205
/// ```
206
- public static MemorySegment type_map (Arena arena , long base , MemorySegment fn , MemorySegment a ,
206
+ public static MemorySegment type_map (long base , MemorySegment fn , MemorySegment a ,
207
207
MemorySegment b ) throws VipsError {
208
208
if (!VipsValidation .isValidPointer (a )) {
209
209
VipsValidation .throwInvalidInputError ("vips_type_map" , "a" );
@@ -215,24 +215,22 @@ public static MemorySegment type_map(Arena arena, long base, MemorySegment fn, M
215
215
if (!VipsValidation .isValidPointer (result )) {
216
216
VipsValidation .throwInvalidOutputError ("vips_type_map" , "result" );
217
217
}
218
- result = result .reinterpret (arena , VipsRaw ::g_object_unref );
219
218
return result ;
220
219
}
221
220
222
221
/// Binding for:
223
222
/// ```c
224
223
/// void *vips_type_map_all(GType base, VipsTypeMapFn fn, void *a)
225
224
/// ```
226
- public static MemorySegment type_map_all (Arena arena , long base , MemorySegment fn ,
227
- MemorySegment a ) throws VipsError {
225
+ public static MemorySegment type_map_all (long base , MemorySegment fn , MemorySegment a ) throws
226
+ VipsError {
228
227
if (!VipsValidation .isValidPointer (a )) {
229
228
VipsValidation .throwInvalidInputError ("vips_type_map_all" , "a" );
230
229
}
231
230
var result = VipsRaw .vips_type_map_all (base , fn , a );
232
231
if (!VipsValidation .isValidPointer (result )) {
233
232
VipsValidation .throwInvalidOutputError ("vips_type_map_all" , "result" );
234
233
}
235
- result = result .reinterpret (arena , VipsRaw ::g_object_unref );
236
234
return result ;
237
235
}
238
236
@@ -326,7 +324,7 @@ public static void area_unref(MemorySegment area) throws VipsError {
326
324
/// ```c
327
325
/// void *vips_area_get_data(VipsArea *area, size_t *length, int *n, GType *type, size_t *sizeof_type)
328
326
/// ```
329
- public static MemorySegment area_get_data (Arena arena , MemorySegment area , MemorySegment length ,
327
+ public static MemorySegment area_get_data (MemorySegment area , MemorySegment length ,
330
328
MemorySegment n , MemorySegment type , MemorySegment sizeof_type ) throws VipsError {
331
329
if (!VipsValidation .isValidPointer (area )) {
332
330
VipsValidation .throwInvalidInputError ("vips_area_get_data" , "area" );
@@ -347,7 +345,6 @@ public static MemorySegment area_get_data(Arena arena, MemorySegment area, Memor
347
345
if (!VipsValidation .isValidPointer (result )) {
348
346
VipsValidation .throwInvalidOutputError ("vips_area_get_data" , "result" );
349
347
}
350
- result = result .reinterpret (arena , VipsRaw ::g_object_unref );
351
348
return result ;
352
349
}
353
350
@@ -484,8 +481,8 @@ public static void value_set_area(MemorySegment value, MemorySegment free_fn, Me
484
481
/// ```c
485
482
/// void *vips_value_get_area(const GValue *value, size_t *length)
486
483
/// ```
487
- public static MemorySegment value_get_area (Arena arena , MemorySegment value , MemorySegment length )
488
- throws VipsError {
484
+ public static MemorySegment value_get_area (MemorySegment value , MemorySegment length ) throws
485
+ VipsError {
489
486
if (!VipsValidation .isValidPointer (value )) {
490
487
VipsValidation .throwInvalidInputError ("vips_value_get_area" , "value" );
491
488
}
@@ -496,7 +493,6 @@ public static MemorySegment value_get_area(Arena arena, MemorySegment value, Mem
496
493
if (!VipsValidation .isValidPointer (result )) {
497
494
VipsValidation .throwInvalidOutputError ("vips_value_get_area" , "result" );
498
495
}
499
- result = result .reinterpret (arena , VipsRaw ::g_object_unref );
500
496
return result ;
501
497
}
502
498
@@ -564,8 +560,8 @@ public static void value_set_ref_string(Arena arena, MemorySegment value, String
564
560
/// ```c
565
561
/// void *vips_value_get_blob(const GValue *value, size_t *length)
566
562
/// ```
567
- public static MemorySegment value_get_blob (Arena arena , MemorySegment value , MemorySegment length )
568
- throws VipsError {
563
+ public static MemorySegment value_get_blob (MemorySegment value , MemorySegment length ) throws
564
+ VipsError {
569
565
if (!VipsValidation .isValidPointer (value )) {
570
566
VipsValidation .throwInvalidInputError ("vips_value_get_blob" , "value" );
571
567
}
@@ -576,7 +572,6 @@ public static MemorySegment value_get_blob(Arena arena, MemorySegment value, Mem
576
572
if (!VipsValidation .isValidPointer (result )) {
577
573
VipsValidation .throwInvalidOutputError ("vips_value_get_blob" , "result" );
578
574
}
579
- result = result .reinterpret (arena , VipsRaw ::g_object_unref );
580
575
return result ;
581
576
}
582
577
@@ -626,7 +621,7 @@ public static void value_set_array(MemorySegment value, int n, long type, long s
626
621
/// ```c
627
622
/// void *vips_value_get_array(const GValue *value, int *n, GType *type, size_t *sizeof_type)
628
623
/// ```
629
- public static MemorySegment value_get_array (Arena arena , MemorySegment value , MemorySegment n ,
624
+ public static MemorySegment value_get_array (MemorySegment value , MemorySegment n ,
630
625
MemorySegment type , MemorySegment sizeof_type ) throws VipsError {
631
626
if (!VipsValidation .isValidPointer (value )) {
632
627
VipsValidation .throwInvalidInputError ("vips_value_get_array" , "value" );
@@ -644,7 +639,6 @@ public static MemorySegment value_get_array(Arena arena, MemorySegment value, Me
644
639
if (!VipsValidation .isValidPointer (result )) {
645
640
VipsValidation .throwInvalidOutputError ("vips_value_get_array" , "result" );
646
641
}
647
- result = result .reinterpret (arena , VipsRaw ::g_object_unref );
648
642
return result ;
649
643
}
650
644
@@ -1083,6 +1077,25 @@ public static int image_write(MemorySegment image, MemorySegment out) throws Vip
1083
1077
return result ;
1084
1078
}
1085
1079
1080
+ /// Binding for:
1081
+ /// ```c
1082
+ /// void *vips_image_write_to_memory(VipsImage *in, size_t *size)
1083
+ /// ```
1084
+ public static MemorySegment image_write_to_memory (MemorySegment in , MemorySegment size ) throws
1085
+ VipsError {
1086
+ if (!VipsValidation .isValidPointer (in )) {
1087
+ VipsValidation .throwInvalidInputError ("vips_image_write_to_memory" , "in" );
1088
+ }
1089
+ if (!VipsValidation .isValidPointer (size )) {
1090
+ VipsValidation .throwInvalidInputError ("vips_image_write_to_memory" , "size" );
1091
+ }
1092
+ var result = VipsRaw .vips_image_write_to_memory (in , size );
1093
+ if (!VipsValidation .isValidPointer (result )) {
1094
+ VipsValidation .throwInvalidOutputError ("vips_image_write_to_memory" , "result" );
1095
+ }
1096
+ return result ;
1097
+ }
1098
+
1086
1099
/// Binding for:
1087
1100
/// ```c
1088
1101
/// gboolean vips_image_hasalpha(VipsImage *image)
@@ -1597,8 +1610,8 @@ public static long image_get_typeof(Arena arena, MemorySegment image, String nam
1597
1610
/// ```c
1598
1611
/// void *vips_image_map(VipsImage *image, VipsImageMapFn fn, void *a)
1599
1612
/// ```
1600
- public static MemorySegment image_map (Arena arena , MemorySegment image , MemorySegment fn ,
1601
- MemorySegment a ) throws VipsError {
1613
+ public static MemorySegment image_map (MemorySegment image , MemorySegment fn , MemorySegment a )
1614
+ throws VipsError {
1602
1615
if (!VipsValidation .isValidPointer (image )) {
1603
1616
VipsValidation .throwInvalidInputError ("vips_image_map" , "image" );
1604
1617
}
@@ -1609,7 +1622,6 @@ public static MemorySegment image_map(Arena arena, MemorySegment image, MemorySe
1609
1622
if (!VipsValidation .isValidPointer (result )) {
1610
1623
VipsValidation .throwInvalidOutputError ("vips_image_map" , "result" );
1611
1624
}
1612
- result = result .reinterpret (arena , VipsRaw ::g_object_unref );
1613
1625
return result ;
1614
1626
}
1615
1627
0 commit comments