Release 0.41.92
[vala-gnome.git] / tests / gir / array-fixed-length.test
blobd4ea0175d6cbdfa150f714b44873324cf59b35e8
1 GIR
3 Input:
5       <function name="get_array_return" c:identifier="test_get_array_return">
6         <return-value transfer-ownership="none">
7           <array zero-terminated="0" c:type="gpointer*" fixed-size="16">
8             <type name="guint8"/>
9           </array>
10         </return-value>
11       </function>
13       <function name="change_array" c:identifier="test_change_array">
14         <return-value transfer-ownership="none">
15           <type name="none" c:type="void"/>
16         </return-value>
17         <parameters>
18           <parameter name="array"
19                      direction="inout"
20                      caller-allocates="1"
21                      transfer-ownership="full">
22             <array zero-terminated="0" c:type="gpointer*" fixed-size="2">
23               <type name="guint8"/>
24             </array>
25           </parameter>
26         </parameters>
27       </function>
29       <function name="get_array_out" c:identifier="test_get_array_out">
30         <return-value transfer-ownership="none">
31           <type name="none" c:type="void"/>
32         </return-value>
33         <parameters>
34           <parameter name="array"
35                      direction="out"
36                      caller-allocates="1"
37                      transfer-ownership="full">
38             <array zero-terminated="0" c:type="gpointer*" fixed-size="8">
39               <type name="guint8"/>
40             </array>
41           </parameter>
42         </parameters>
43       </function>
45       <function name="set_array" c:identifier="test_set_array">
46         <return-value transfer-ownership="none">
47           <type name="none" c:type="void"/>
48         </return-value>
49         <parameters>
50           <parameter name="array"
51                      transfer-ownership="none">
52             <array zero-terminated="0" c:type="gpointer*" fixed-size="4">
53               <type name="guint8"/>
54             </array>
55           </parameter>
56         </parameters>
57       </function>
59 Output:
61 [CCode (cheader_filename = "test.h")]
62 public static void change_array ([CCode (array_length = false)] ref uint8 array[2]);
63 [CCode (cheader_filename = "test.h")]
64 public static void get_array_out ([CCode (array_length = false)] out uint8 array[8]);
65 [CCode (array_length = false, array_length_cexpr = "16", cheader_filename = "test.h")]
66 public static unowned uint8[] get_array_return ();
67 [CCode (cheader_filename = "test.h")]
68 public static void set_array ([CCode (array_length = false)] uint8 array[4]);