[vala] Avoid GPOINTER_TO_* macros with va_arg



commit 92c3780738f99c7f060adc65c1f150b895453a03
Author: Jürg Billeter <j bitron ch>
Date:   Sat Mar 20 21:55:02 2010 +0100

    Avoid GPOINTER_TO_* macros with va_arg

 codegen/valaccodebasemodule.vala |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index c3a30f8..4eecd38 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -3444,8 +3444,9 @@ internal class Vala.CCodeBaseModule : CCodeModule {
 	public override void visit_expression (Expression expr) {
 		if (expr.ccodenode != null && !expr.lvalue) {
 			if (expr.formal_value_type is GenericType && !(expr.value_type is GenericType)) {
-				if (expr.formal_value_type.type_parameter.parent_symbol != garray_type /*&&
-				    expr.formal_value_type.type_parameter.parent_symbol != va_list_type*/) {
+				var st = expr.formal_value_type.type_parameter.parent_symbol.parent_symbol as Struct;
+				if (expr.formal_value_type.type_parameter.parent_symbol != garray_type &&
+				    (st == null || st.get_cname () != "va_list")) {
 					// GArray and va_list don't use pointer-based generics
 					expr.ccodenode = convert_from_generic_pointer ((CCodeExpression) expr.ccodenode, expr.value_type);
 				}



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