1 /* valaarrayresizemethod.c generated by valac, the Vala compiler
2 * generated from valaarrayresizemethod.vala, do not modify */
3
4 /* valaarrayresizemethod.vala
5 *
6 * Copyright (C) 2007-2008 Jürg Billeter
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 *
22 * Author:
23 * Jürg Billeter <j@bitron.ch>
24 */
25
26 #include "vala.h"
27 #include <glib.h>
28
29 #define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL)))
30
31 static gpointer vala_array_resize_method_parent_class = NULL;
32
33 static GType vala_array_resize_method_get_type_once (void);
34
35 /**
36 * Creates a new array resize method.
37 *
38 * @return newly created method
39 */
40 ValaArrayResizeMethod*
vala_array_resize_method_construct(GType object_type,ValaSourceReference * source_reference)41 vala_array_resize_method_construct (GType object_type,
42 ValaSourceReference* source_reference)
43 {
44 ValaArrayResizeMethod* self = NULL;
45 ValaVoidType* _tmp0_;
46 ValaVoidType* _tmp1_;
47 _tmp0_ = vala_void_type_new (NULL);
48 _tmp1_ = _tmp0_;
49 self = (ValaArrayResizeMethod*) vala_method_construct (object_type, "resize", (ValaDataType*) _tmp1_, source_reference, NULL);
50 _vala_code_node_unref0 (_tmp1_);
51 vala_symbol_set_external ((ValaSymbol*) self, TRUE);
52 vala_code_node_set_attribute_double ((ValaCodeNode*) self, "CCode", "instance_pos", 0.1, NULL);
53 return self;
54 }
55
56 ValaArrayResizeMethod*
vala_array_resize_method_new(ValaSourceReference * source_reference)57 vala_array_resize_method_new (ValaSourceReference* source_reference)
58 {
59 return vala_array_resize_method_construct (VALA_TYPE_ARRAY_RESIZE_METHOD, source_reference);
60 }
61
62 static void
vala_array_resize_method_class_init(ValaArrayResizeMethodClass * klass,gpointer klass_data)63 vala_array_resize_method_class_init (ValaArrayResizeMethodClass * klass,
64 gpointer klass_data)
65 {
66 vala_array_resize_method_parent_class = g_type_class_peek_parent (klass);
67 }
68
69 static void
vala_array_resize_method_instance_init(ValaArrayResizeMethod * self,gpointer klass)70 vala_array_resize_method_instance_init (ValaArrayResizeMethod * self,
71 gpointer klass)
72 {
73 }
74
75 /**
76 * Represents the Array.resize method.
77 */
78 static GType
vala_array_resize_method_get_type_once(void)79 vala_array_resize_method_get_type_once (void)
80 {
81 static const GTypeInfo g_define_type_info = { sizeof (ValaArrayResizeMethodClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_array_resize_method_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaArrayResizeMethod), 0, (GInstanceInitFunc) vala_array_resize_method_instance_init, NULL };
82 GType vala_array_resize_method_type_id;
83 vala_array_resize_method_type_id = g_type_register_static (VALA_TYPE_METHOD, "ValaArrayResizeMethod", &g_define_type_info, 0);
84 return vala_array_resize_method_type_id;
85 }
86
87 GType
vala_array_resize_method_get_type(void)88 vala_array_resize_method_get_type (void)
89 {
90 static volatile gsize vala_array_resize_method_type_id__volatile = 0;
91 if (g_once_init_enter (&vala_array_resize_method_type_id__volatile)) {
92 GType vala_array_resize_method_type_id;
93 vala_array_resize_method_type_id = vala_array_resize_method_get_type_once ();
94 g_once_init_leave (&vala_array_resize_method_type_id__volatile, vala_array_resize_method_type_id);
95 }
96 return vala_array_resize_method_type_id__volatile;
97 }
98
99