~ubuntu-branches/ubuntu/maverick/vala/maverick

« back to all changes in this revision

Viewing changes to vala/valacomment.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-04-02 10:10:55 UTC
  • mfrom: (1.4.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100402101055-qbx3okzv0tnp3wpp
Tags: 0.8.0-0ubuntu1
* New upstream release:
  - Infer type arguments when calling generic methods.
  - Support `in' operator for arrays.
  - Add experimental support for regular expression literals.
  - Add experimental support for chained relational expressions.
  - Add va_list support.
  - Add clutter-gtk-0.10 bindings (Gordon Allott).
  - Add gdl-1.0 bindings (Nicolas Joseph).
  - Add gstreamer-app-0.10 bindings (Sebastian Dröge).
  - Add gstreamer-cdda-0.10 bindings (Sebastian Dröge).
  - Add gudev-1.0 bindings (Jim Nelson).
  - Add libgda-report-4.0 bindings (Shawn Ferris).
  - Add libgvc (graphviz) bindings (Martin Olsson).
  - Add purple bindings (Adrien Bustany).
  - Many bug fixes and binding updates.
* debian/patches/99_ltmain_as-needed.patch: refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
void vala_comment_unref (gpointer instance);
82
82
GParamSpec* vala_param_spec_comment (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
83
83
void vala_value_set_comment (GValue* value, gpointer v_object);
 
84
void vala_value_take_comment (GValue* value, gpointer v_object);
84
85
gpointer vala_value_get_comment (const GValue* value);
85
86
GType vala_comment_get_type (void);
86
87
gpointer vala_source_reference_ref (gpointer instance);
87
88
void vala_source_reference_unref (gpointer instance);
88
89
GParamSpec* vala_param_spec_source_reference (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
89
90
void vala_value_set_source_reference (GValue* value, gpointer v_object);
 
91
void vala_value_take_source_reference (GValue* value, gpointer v_object);
90
92
gpointer vala_value_get_source_reference (const GValue* value);
91
93
GType vala_source_reference_get_type (void);
92
94
#define VALA_COMMENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALA_TYPE_COMMENT, ValaCommentPrivate))
247
249
}
248
250
 
249
251
 
 
252
void vala_value_take_comment (GValue* value, gpointer v_object) {
 
253
        ValaComment* old;
 
254
        g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VALA_TYPE_COMMENT));
 
255
        old = value->data[0].v_pointer;
 
256
        if (v_object) {
 
257
                g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VALA_TYPE_COMMENT));
 
258
                g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
 
259
                value->data[0].v_pointer = v_object;
 
260
        } else {
 
261
                value->data[0].v_pointer = NULL;
 
262
        }
 
263
        if (old) {
 
264
                vala_comment_unref (old);
 
265
        }
 
266
}
 
267
 
 
268
 
250
269
static void vala_comment_class_init (ValaCommentClass * klass) {
251
270
        vala_comment_parent_class = g_type_class_peek_parent (klass);
252
271
        VALA_COMMENT_CLASS (klass)->finalize = vala_comment_finalize;
269
288
 
270
289
 
271
290
GType vala_comment_get_type (void) {
272
 
        static GType vala_comment_type_id = 0;
273
 
        if (vala_comment_type_id == 0) {
 
291
        static volatile gsize vala_comment_type_id__volatile = 0;
 
292
        if (g_once_init_enter (&vala_comment_type_id__volatile)) {
274
293
                static const GTypeValueTable g_define_type_value_table = { vala_value_comment_init, vala_value_comment_free_value, vala_value_comment_copy_value, vala_value_comment_peek_pointer, "p", vala_value_comment_collect_value, "p", vala_value_comment_lcopy_value };
275
294
                static const GTypeInfo g_define_type_info = { sizeof (ValaCommentClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_comment_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaComment), 0, (GInstanceInitFunc) vala_comment_instance_init, &g_define_type_value_table };
276
295
                static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
 
296
                GType vala_comment_type_id;
277
297
                vala_comment_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ValaComment", &g_define_type_info, &g_define_type_fundamental_info, 0);
 
298
                g_once_init_leave (&vala_comment_type_id__volatile, vala_comment_type_id);
278
299
        }
279
 
        return vala_comment_type_id;
 
300
        return vala_comment_type_id__volatile;
280
301
}
281
302
 
282
303