vala r2311 - in trunk: . vala vapi
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r2311 - in trunk: . vala vapi
- Date: Fri, 9 Jan 2009 18:59:21 +0000 (UTC)
Author: juergbi
Date: Fri Jan 9 18:59:21 2009
New Revision: 2311
URL: http://svn.gnome.org/viewvc/vala?rev=2311&view=rev
Log:
2009-01-09 JÃrg Billeter <j bitron ch>
* vala/valacodenode.vala:
Add CodeNode.get_type_name method
* vapi/gobject-2.0.vapi:
Add G_TYPE_FROM_INSTANCE binding
Modified:
trunk/ChangeLog
trunk/vala/valacodenode.vala
trunk/vapi/gobject-2.0.vapi
Modified: trunk/vala/valacodenode.vala
==============================================================================
--- trunk/vala/valacodenode.vala (original)
+++ trunk/vala/valacodenode.vala Fri Jan 9 18:59:21 2009
@@ -1,6 +1,6 @@
/* valacodenode.vala
*
- * Copyright (C) 2006-2008 JÃrg Billeter
+ * Copyright (C) 2006-2009 JÃrg Billeter
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -189,4 +189,8 @@
public string get_temp_name () {
return "." + (++last_temp_nr).to_string ();
}
+
+ public weak string get_type_name () {
+ return Type.from_instance (this).name ();
+ }
}
Modified: trunk/vapi/gobject-2.0.vapi
==============================================================================
--- trunk/vapi/gobject-2.0.vapi (original)
+++ trunk/vapi/gobject-2.0.vapi Fri Jan 9 18:59:21 2009
@@ -1,6 +1,7 @@
/* gobject-2.0.vala
*
- * Copyright (C) 2006-2008 JÃrg Billeter, Raffaele Sandrini
+ * Copyright (C) 2006-2009 JÃrg Billeter
+ * Copyright (C) 2006-2008 Raffaele Sandrini
* Copyright (C) 2007 Mathias Hasselmann
*
* This library is free software; you can redistribute it and/or
@@ -47,7 +48,10 @@
public bool is_interface ();
[CCode (cname = "G_TYPE_IS_VALUE_TYPE")]
public bool is_value_type ();
-
+
+ [CCode (cname = "G_TYPE_FROM_INSTANCE")]
+ public static Type from_instance (void* instance);
+
public Type[] children ();
public uint depth ();
public static Type from_name (string name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]