[vala] glib-2.0: Fix time_t binding



commit e0a48017c7f91f83fff2ed3ff9debddc5b906191
Author: Jürg Billeter <j bitron ch>
Date:   Tue May 26 19:54:26 2009 +0200

    glib-2.0: Fix time_t binding
    
    Fixes bug 583177.
---
 vala/valastruct.vala |    4 ++++
 vapi/glib-2.0.vapi   |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/vala/valastruct.vala b/vala/valastruct.vala
index 573aa97..684425a 100644
--- a/vala/valastruct.vala
+++ b/vala/valastruct.vala
@@ -592,6 +592,10 @@ public class Vala.Struct : TypeSymbol {
 				return true;
 			}
 		}
+		if (get_attribute ("ByRef") != null) {
+			// used by time_t
+			return false;
+		}
 		return (boolean_type || integer_type || floating_type
 		        || get_attribute ("SimpleType") != null);
 	}
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index 008c028..37c1d3e 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -665,6 +665,7 @@ public struct double {
 }
 
 [CCode (cheader_filename = "time.h")]
+[ByRef]
 [IntegerType (rank = 8)]
 public struct time_t {
 	[CCode (cname = "time")]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]