Introspect/Constant.js
[gnome.introspection-doc-generator] / Introspect / Constant.js
index 376d960..054a8c2 100644 (file)
@@ -16,6 +16,13 @@ Basic        = imports.Basic.Basic;
 
 /**
  * Constant
+ *
+ *    <union name="Argument" c:type="GIArgument">
+
+ * NEEDS <function name="constant_info_get_value"
+              c:identifier="g_constant_info_get_value"
+              introspectable="1">
+
  */
 
 
@@ -36,7 +43,10 @@ Constant = XObject.define(
         if (ty != 'interface') {
             
             var argm = new GI._Argument();
-            GI.constant_info_get_value ( prop ,argm);
+            GI.constant_info_get_value ?
+                GI.constant_info_get_value ( prop ,argm) :
+                prop.get_value(argm);
+                
             if (ty != 'utf8') {
                 this.value = argm.v_long;
             } else {