=== modified file 'gobject/valaccodeassignmentbinding.vala'
--- gobject/valaccodeassignmentbinding.vala	2008-05-03 02:42:41 +0000
+++ gobject/valaccodeassignmentbinding.vala	2008-05-05 07:13:58 +0000
@@ -133,7 +133,7 @@
 		if (ma.inner != null) {
 			ccall.add_argument ((CCodeExpression) ma.inner.ccodenode);
 		} else {
-			ccall.add_argument (new CCodeIdentifier ("self"));
+			ccall.add_argument (new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME));
 		}
 
 		if (sig is DynamicSignal) {
@@ -194,10 +194,10 @@
 				if (right_ma.inner != null) {
 					ccall.add_argument ((CCodeExpression) right_ma.inner.ccodenode);
 				} else {
-					ccall.add_argument (new CCodeIdentifier ("self"));
+					ccall.add_argument (new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME));
 				}
 			} else if (assignment.right is LambdaExpression) {
-				ccall.add_argument (new CCodeIdentifier ("self"));
+				ccall.add_argument (new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME));
 			}
 			if (!disconnect && !(sig is DynamicSignal)) {
 				// g_signal_connect_object
@@ -232,7 +232,7 @@
 
 		var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
 
-		var cparam = new CCodeFormalParameter ("self", "gpointer");
+		var cparam = new CCodeFormalParameter (CCodeGenerator.SELF_VAR_NAME, "gpointer");
 		cparam_map.set (codegen.get_param_pos (-1), cparam);
 
 		cparam = new CCodeFormalParameter ("sender", ((Typesymbol) sig.parent_symbol).get_cname () + "*");
@@ -269,7 +269,7 @@
 		var carg_map = new HashMap<int,CCodeExpression> (direct_hash, direct_equal);
 
 		if (m.binding == MemberBinding.INSTANCE) {
-			carg_map.set (codegen.get_param_pos (m.cinstance_parameter_position), new CCodeIdentifier ("self"));
+			carg_map.set (codegen.get_param_pos (m.cinstance_parameter_position), new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME));
 		}
 
 		int i = -1;

=== modified file 'gobject/valaccodeclassbinding.vala'
--- gobject/valaccodeclassbinding.vala	2008-05-03 02:42:41 +0000
+++ gobject/valaccodeclassbinding.vala	2008-05-05 07:13:58 +0000
@@ -148,7 +148,7 @@
 
 		if (is_gtypeinstance) {
 			if (is_fundamental) {
-				var ref_count = new CCodeAssignment (new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), "ref_count"), new CCodeConstant ("1"));
+				var ref_count = new CCodeAssignment (new CCodeMemberAccess.pointer (new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME), "ref_count"), new CCodeConstant ("1"));
 				codegen.instance_init_fragment.append (new CCodeExpressionStatement (ref_count));
 			} else if (is_gobject) {
 				if (class_has_readable_properties (cl) || cl.get_type_parameters ().size > 0) {
@@ -213,11 +213,11 @@
 				var unref_block = new CCodeBlock ();
 
 				var cdecl = new CCodeDeclaration (cl.get_cname () + "*");
-				cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer ("self", new CCodeIdentifier ("instance")));
+				cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer (CCodeGenerator.SELF_VAR_NAME, new CCodeIdentifier ("instance")));
 				ref_block.add_statement (cdecl);
 				unref_block.add_statement (cdecl);
 
-				var ref_count = new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), "ref_count");
+				var ref_count = new CCodeMemberAccess.pointer (new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME), "ref_count");
 
 				var ccall = new CCodeFunctionCall (new CCodeIdentifier ("g_atomic_int_inc"));
 				ccall.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, ref_count));
@@ -227,13 +227,13 @@
 
 				var destroy_block = new CCodeBlock ();
 				var get_class = new CCodeFunctionCall (new CCodeIdentifier ("%s_GET_CLASS".printf (cl.get_upper_case_cname (null))));
-				get_class.add_argument (new CCodeIdentifier ("self"));
+				get_class.add_argument (new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME));
 				var finalize = new CCodeMemberAccess.pointer (get_class, "finalize");
 				var finalize_call = new CCodeFunctionCall (finalize);
-				finalize_call.add_argument (new CCodeIdentifier ("self"));
+				finalize_call.add_argument (new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME));
 				//destroy_block.add_statement (new CCodeExpressionStatement (finalize_call));
 				var free = new CCodeFunctionCall (new CCodeIdentifier ("g_type_free_instance"));
-				free.add_argument (new CCodeCastExpression (new CCodeIdentifier ("self"), "GTypeInstance *"));
+				free.add_argument (new CCodeCastExpression (new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME), "GTypeInstance *"));
 				destroy_block.add_statement (new CCodeExpressionStatement (free));
 
 				ccall = new CCodeFunctionCall (new CCodeIdentifier ("g_atomic_int_dec_and_test"));
@@ -252,7 +252,7 @@
 				function.modifiers = CCodeModifiers.STATIC;
 			}
 
-			function.add_parameter (new CCodeFormalParameter ("self", cl.get_cname () + "*"));
+			function.add_parameter (new CCodeFormalParameter (CCodeGenerator.SELF_VAR_NAME, cl.get_cname () + "*"));
 
 			if (cl.access != SymbolAccessibility.PRIVATE) {
 				codegen.header_type_member_declaration.append (function.copy ());
@@ -266,7 +266,7 @@
 
 			var ccall = new CCodeFunctionCall (new CCodeIdentifier ("g_slice_free"));
 			ccall.add_argument (new CCodeIdentifier (cl.get_cname ()));
-			ccall.add_argument (new CCodeIdentifier ("self"));
+			ccall.add_argument (new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME));
 			cblock.add_statement (new CCodeExpressionStatement (ccall));
 
 			function.block = cblock;
@@ -504,7 +504,7 @@
 	
 	private void add_instance_init_function (Class cl) {
 		var instance_init = new CCodeFunction ("%s_init".printf (cl.get_lower_case_cname (null)), "void");
-		instance_init.add_parameter (new CCodeFormalParameter ("self", "%s *".printf (cl.get_cname ())));
+		instance_init.add_parameter (new CCodeFormalParameter (CCodeGenerator.SELF_VAR_NAME, "%s *".printf (cl.get_cname ())));
 		instance_init.modifiers = CCodeModifiers.STATIC;
 		
 		var init_block = new CCodeBlock ();
@@ -512,8 +512,8 @@
 		
 		if (cl.has_private_fields || cl.get_type_parameters ().size > 0) {
 			var ccall = new CCodeFunctionCall (new CCodeIdentifier ("%s_GET_PRIVATE".printf (cl.get_upper_case_cname (null))));
-			ccall.add_argument (new CCodeIdentifier ("self"));
-			init_block.add_statement (new CCodeExpressionStatement (new CCodeAssignment (new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), "priv"), ccall)));
+			ccall.add_argument (new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME));
+			init_block.add_statement (new CCodeExpressionStatement (new CCodeAssignment (new CCodeMemberAccess.pointer (new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME), "priv"), ccall)));
 		}
 		
 		init_block.add_statement (codegen.instance_init_fragment);
@@ -541,7 +541,7 @@
 		CCodeFunctionCall ccall = new InstanceCast (new CCodeIdentifier ("obj"), cl);
 
 		var cdecl = new CCodeDeclaration ("%s *".printf (cl.get_cname ()));
-		cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer ("self", ccall));
+		cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer (CCodeGenerator.SELF_VAR_NAME, ccall));
 		
 		cblock.add_statement (cdecl);
 
@@ -594,7 +594,7 @@
 		
 		var ccall = new InstanceCast (new CCodeIdentifier ("object"), cl);
 		var cdecl = new CCodeDeclaration ("%s *".printf (cl.get_cname ()));
-		cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer ("self", ccall));
+		cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer (CCodeGenerator.SELF_VAR_NAME, ccall));
 		block.add_statement (cdecl);
 		
 		var cswitch = new CCodeSwitchStatement (new CCodeIdentifier ("property_id"));
@@ -618,7 +618,7 @@
 
 			var ccase = new CCodeCaseStatement (new CCodeIdentifier (prop.get_upper_case_cname ()));
 			var ccall = new CCodeFunctionCall (new CCodeIdentifier ("%s_get_%s".printf (prefix, prop.name)));
-			ccall.add_argument (new CCodeIdentifier ("self"));
+			ccall.add_argument (new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME));
 			var csetcall = new CCodeFunctionCall ();
 			csetcall.call = get_value_setter_function (prop.type_reference);
 			csetcall.add_argument (new CCodeIdentifier ("value"));
@@ -649,7 +649,7 @@
 		
 		var ccall = new InstanceCast (new CCodeIdentifier ("object"), cl);
 		var cdecl = new CCodeDeclaration ("%s *".printf (cl.get_cname ()));
-		cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer ("self", ccall));
+		cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer (CCodeGenerator.SELF_VAR_NAME, ccall));
 		block.add_statement (cdecl);
 		
 		var cswitch = new CCodeSwitchStatement (new CCodeIdentifier ("property_id"));
@@ -673,7 +673,7 @@
 
 			var ccase = new CCodeCaseStatement (new CCodeIdentifier (prop.get_upper_case_cname ()));
 			var ccall = new CCodeFunctionCall (new CCodeIdentifier ("%s_set_%s".printf (prefix, prop.name)));
-			ccall.add_argument (new CCodeIdentifier ("self"));
+			ccall.add_argument (new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME));
 			var cgetcall = new CCodeFunctionCall ();
 			if (prop.type_reference.data_type != null) {
 				cgetcall.call = new CCodeIdentifier (prop.type_reference.data_type.get_get_value_function ());
@@ -701,7 +701,7 @@
 			func_name = "%s_type".printf (type_param.name.down ());
 			enum_value = "%s_%s".printf (cl.get_lower_case_cname (null), func_name).up ();
 			ccase = new CCodeCaseStatement (new CCodeIdentifier (enum_value));
-			cfield = new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), "priv"), func_name);
+			cfield = new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME), "priv"), func_name);
 			cgetcall = new CCodeFunctionCall (new CCodeIdentifier ("g_value_get_gtype"));
 			cgetcall.add_argument (new CCodeIdentifier ("value"));
 			ccase.add_statement (new CCodeExpressionStatement (new CCodeAssignment (cfield, cgetcall)));
@@ -711,7 +711,7 @@
 			func_name = "%s_dup_func".printf (type_param.name.down ());
 			enum_value = "%s_%s".printf (cl.get_lower_case_cname (null), func_name).up ();
 			ccase = new CCodeCaseStatement (new CCodeIdentifier (enum_value));
-			cfield = new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), "priv"), func_name);
+			cfield = new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME), "priv"), func_name);
 			cgetcall = new CCodeFunctionCall (new CCodeIdentifier ("g_value_get_pointer"));
 			cgetcall.add_argument (new CCodeIdentifier ("value"));
 			ccase.add_statement (new CCodeExpressionStatement (new CCodeAssignment (cfield, cgetcall)));
@@ -721,7 +721,7 @@
 			func_name = "%s_destroy_func".printf (type_param.name.down ());
 			enum_value = "%s_%s".printf (cl.get_lower_case_cname (null), func_name).up ();
 			ccase = new CCodeCaseStatement (new CCodeIdentifier (enum_value));
-			cfield = new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), "priv"), func_name);
+			cfield = new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME), "priv"), func_name);
 			cgetcall = new CCodeFunctionCall (new CCodeIdentifier ("g_value_get_pointer"));
 			cgetcall.add_argument (new CCodeIdentifier ("value"));
 			ccase.add_statement (new CCodeExpressionStatement (new CCodeAssignment (cfield, cgetcall)));

=== modified file 'gobject/valaccodedynamicmethodbinding.vala'
--- gobject/valaccodedynamicmethodbinding.vala	2008-05-03 02:42:41 +0000
+++ gobject/valaccodedynamicmethodbinding.vala	2008-05-05 07:13:58 +0000
@@ -116,12 +116,12 @@
 			cb_fun.add_parameter (new CCodeFormalParameter ("user_data", "void*"));
 			cb_fun.block = new CCodeBlock ();
 			var cerrdecl = new CCodeDeclaration ("GError*");
-			cerrdecl.add_declarator (new CCodeVariableDeclarator.with_initializer ("error", new CCodeConstant ("NULL")));
+			cerrdecl.add_declarator (new CCodeVariableDeclarator.with_initializer (CCodeGenerator.ERROR_VAR_NAME, new CCodeConstant ("NULL")));
 			cb_fun.block.add_statement (cerrdecl);
 			var cend_call = new CCodeFunctionCall (new CCodeIdentifier ("dbus_g_proxy_end_call"));
 			cend_call.add_argument (new CCodeIdentifier ("proxy"));
 			cend_call.add_argument (new CCodeIdentifier ("call"));
-			cend_call.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier ("error")));
+			cend_call.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier (CCodeGenerator.ERROR_VAR_NAME)));
 			var creply_call = new CCodeFunctionCall ((CCodeExpression) callback.ccodenode);
 			creply_call.add_argument (new CCodeIdentifier ("user_data"));
 			int param_count = reply_method.get_parameters ().size;
@@ -163,7 +163,7 @@
 			}
 			cend_call.add_argument (new CCodeIdentifier ("G_TYPE_INVALID"));
 			cb_fun.block.add_statement (new CCodeExpressionStatement (cend_call));
-			creply_call.add_argument (new CCodeIdentifier ("error"));
+			creply_call.add_argument (new CCodeIdentifier (CCodeGenerator.ERROR_VAR_NAME));
 			cb_fun.block.add_statement (new CCodeExpressionStatement (creply_call));
 			codegen.source_type_member_definition.append (cb_fun);
 
@@ -173,7 +173,7 @@
 		} else if (found_out || !(method.return_type is VoidType)) {
 			ccall.call = new CCodeIdentifier ("dbus_g_proxy_call");
 
-			ccall.add_argument (new CCodeIdentifier ("error"));
+			ccall.add_argument (new CCodeIdentifier (CCodeGenerator.ERROR_VAR_NAME));
 		} else {
 			ccall.call = new CCodeIdentifier ("dbus_g_proxy_call_no_reply");
 		}

=== modified file 'gobject/valaccodegenerator.vala'
--- gobject/valaccodegenerator.vala	2008-05-03 02:42:41 +0000
+++ gobject/valaccodegenerator.vala	2008-05-05 07:13:58 +0000
@@ -65,6 +65,9 @@
 	public CCodeEnum cenum;
 	public CCodeFunction function;
 	public CCodeBlock block;
+
+	public const string ERROR_VAR_NAME = "__error";
+	public const string SELF_VAR_NAME = "__self";
 	
 	/* all temporary variables */
 	public ArrayList<LocalVariable> temp_vars = new ArrayList<LocalVariable> ();
@@ -462,7 +465,7 @@
 				new CCodeExpressionStatement (
 					new CCodeAssignment (
 						new CCodeMemberAccess.pointer (
-							new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), "priv"),
+							new CCodeMemberAccess.pointer (new CCodeIdentifier (SELF_VAR_NAME), "priv"),
 							get_symbol_lock_name (m)),
 					new CCodeFunctionCall (new CCodeIdentifier (((Class)mutex_type.data_type).default_construction_method.get_cname ())))));
 			
@@ -470,7 +473,7 @@
 			var fc = new CCodeFunctionCall (new CCodeIdentifier ("VALA_FREE_CHECKED"));
 			fc.add_argument (
 				new CCodeMemberAccess.pointer (
-					new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), "priv"),
+					new CCodeMemberAccess.pointer (new CCodeIdentifier (SELF_VAR_NAME), "priv"),
 					get_symbol_lock_name (m)));
 			if (mutex_type.data_type.get_free_function () == null) {
 				Report.error (mutex_type.data_type.source_reference, "The type `%s` doesn't contain a free function".printf (mutex_type.data_type.get_full_name ()));
@@ -524,7 +527,7 @@
 			if (f.binding == MemberBinding.INSTANCE) {
 				st = instance_struct;
 
-				lhs = new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), f.get_cname ());
+				lhs = new CCodeMemberAccess.pointer (new CCodeIdentifier (SELF_VAR_NAME), f.get_cname ());
 			} else if (f.binding == MemberBinding.CLASS) {
 				st = type_struct;
 			} else {
@@ -554,10 +557,10 @@
 			if (f.binding == MemberBinding.INSTANCE) {
 				if (is_gtypeinstance) {
 					st = instance_priv_struct;
-					lhs = new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), "priv"), f.get_cname ());
+					lhs = new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (new CCodeIdentifier (SELF_VAR_NAME), "priv"), f.get_cname ());
 				} else {
 					st = instance_struct;
-					lhs = new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), f.get_cname ());
+					lhs = new CCodeMemberAccess.pointer (new CCodeIdentifier (SELF_VAR_NAME), f.get_cname ());
 				}
 			} else {
 				var cdecl = new CCodeDeclaration (field_ctype);
@@ -777,7 +780,7 @@
 		} else {
 			this_type = new InterfaceInstanceType ((Interface) t);
 		}
-		var cselfparam = new CCodeFormalParameter ("self", this_type.get_cname ());
+		var cselfparam = new CCodeFormalParameter (SELF_VAR_NAME, this_type.get_cname ());
 		var value_type = prop.type_reference.copy ();
 		value_type.takes_ownership = value_type.transfers_ownership;
 		var cvalueparam = new CCodeFormalParameter ("value", value_type.get_cname ());
@@ -813,7 +816,7 @@
 				var ccall = new CCodeFunctionCall (new CCodeIdentifier ("g_object_get"));
 			
 				var ccast = new CCodeFunctionCall (new CCodeIdentifier ("G_OBJECT"));
-				ccast.add_argument (new CCodeIdentifier ("self"));
+				ccast.add_argument (new CCodeIdentifier (SELF_VAR_NAME));
 				ccall.add_argument (ccast);
 				
 				// property name is second argument of g_object_get
@@ -840,7 +843,7 @@
 				var ccall = new CCodeFunctionCall (new CCodeIdentifier ("g_object_set"));
 			
 				var ccast = new CCodeFunctionCall (new CCodeIdentifier ("G_OBJECT"));
-				ccast.add_argument (new CCodeIdentifier ("self"));
+				ccast.add_argument (new CCodeIdentifier (SELF_VAR_NAME));
 				ccall.add_argument (ccast);
 				
 				// property name is second argument of g_object_set
@@ -907,15 +910,15 @@
 			}
 
 			if (returns_real_struct) {
-				function.block.prepend_statement (create_property_type_check_statement (prop, false, t, true, "self"));
+				function.block.prepend_statement (create_property_type_check_statement (prop, false, t, true, SELF_VAR_NAME));
 			} else {
-				function.block.prepend_statement (create_property_type_check_statement (prop, acc.readable, t, true, "self"));
+				function.block.prepend_statement (create_property_type_check_statement (prop, acc.readable, t, true, SELF_VAR_NAME));
 			}
 
 			// notify on property changes
 			if (prop.notify && (acc.writable || acc.construction)) {
 				var notify_call = new CCodeFunctionCall (new CCodeIdentifier ("g_object_notify"));
-				notify_call.add_argument (new CCodeCastExpression (new CCodeIdentifier ("self"), "GObject *"));
+				notify_call.add_argument (new CCodeCastExpression (new CCodeIdentifier (SELF_VAR_NAME), "GObject *"));
 				notify_call.add_argument (prop.get_canonical_cconstant ());
 				function.block.add_statement (new CCodeExpressionStatement (notify_call));
 			}
@@ -984,7 +987,7 @@
 			ccall = new InstanceCast (new CCodeIdentifier ("obj"), cl);
 
 			cdecl = new CCodeDeclaration ("%s *".printf (cl.get_cname ()));
-			cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer ("self", ccall));
+			cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer (SELF_VAR_NAME, ccall));
 		
 			cblock.add_statement (cdecl);
 
@@ -1250,7 +1253,7 @@
 			return new CCodeIdentifier (type.data_type.get_type_id ());
 		} else if (type.type_parameter != null) {
 			string var_name = "%s_type".printf (type.type_parameter.name.down ());
-			return new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), "priv"), var_name);
+			return new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (new CCodeIdentifier (SELF_VAR_NAME), "priv"), var_name);
 		} else {
 			return new CCodeIdentifier ("G_TYPE_NONE");
 		}
@@ -1272,7 +1275,7 @@
 			return new CCodeIdentifier (dup_function);
 		} else if (type.type_parameter != null && current_type_symbol is Class) {
 			string func_name = "%s_dup_func".printf (type.type_parameter.name.down ());
-			return new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), "priv"), func_name);
+			return new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (new CCodeIdentifier (SELF_VAR_NAME), "priv"), func_name);
 		} else if (type is ArrayType) {
 			Report.error (source_reference, "internal error: duplicating %s instances not yet supported".printf (type.to_string ()));
 			return null;
@@ -1299,7 +1302,7 @@
 			return new CCodeIdentifier (unref_function);
 		} else if (type.type_parameter != null && current_type_symbol is Class) {
 			string func_name = "%s_destroy_func".printf (type.type_parameter.name.down ());
-			return new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (new CCodeIdentifier ("self"), "priv"), func_name);
+			return new CCodeMemberAccess.pointer (new CCodeMemberAccess.pointer (new CCodeIdentifier (SELF_VAR_NAME), "priv"), func_name);
 		} else if (type is ArrayType) {
 			return new CCodeIdentifier ("g_free");
 		} else if (type is PointerType) {
@@ -1514,7 +1517,7 @@
 			// TODO ensure one of the error domains matches
 
 			var cpropagate = new CCodeFunctionCall (new CCodeIdentifier ("g_propagate_error"));
-			cpropagate.add_argument (new CCodeIdentifier ("error"));
+			cpropagate.add_argument (new CCodeIdentifier (ERROR_VAR_NAME));
 			cpropagate.add_argument (new CCodeIdentifier ("inner_error"));
 
 			var cerror_block = new CCodeBlock ();
@@ -2364,7 +2367,7 @@
 		var inner_node = ((MemberAccess)stmt.resource).inner;
 		
 		if (inner_node  == null) {
-			l = new CCodeIdentifier ("self");
+			l = new CCodeIdentifier (SELF_VAR_NAME);
 		} else if (stmt.resource.symbol_reference.parent_symbol != current_type_symbol) {
 			 l = new InstanceCast ((CCodeExpression) inner_node.ccodenode, (Typesymbol) stmt.resource.symbol_reference.parent_symbol);
 		} else {
@@ -2533,7 +2536,7 @@
 					CCodeExpression length_expr = null;
 				
 					if (ma.inner == null) {
-						pub_inst = new CCodeIdentifier ("self");
+						pub_inst = new CCodeIdentifier (SELF_VAR_NAME);
 
 						if (current_type_symbol != null) {
 							/* base type is available if this is a type method */
@@ -2617,7 +2620,7 @@
 			return invocation_expr.delegate_target;
 		} else if (delegate_expr is LambdaExpression) {
 			if ((current_method != null && current_method.binding == MemberBinding.INSTANCE) || in_constructor) {
-				return new CCodeIdentifier ("self");
+				return new CCodeIdentifier (SELF_VAR_NAME);
 			} else {
 				return new CCodeConstant ("NULL");
 			}
@@ -2654,7 +2657,7 @@
 				CCodeExpression target_expr = null;
 			
 				if (ma.inner == null) {
-					pub_inst = new CCodeIdentifier ("self");
+					pub_inst = new CCodeIdentifier (SELF_VAR_NAME);
 
 					if (current_type_symbol != null) {
 						/* base type is available if this is a type method */
@@ -2697,7 +2700,7 @@
 				var ma = (MemberAccess) delegate_expr;
 				if (ma.inner == null) {
 					if ((current_method != null && current_method.binding == MemberBinding.INSTANCE) || in_constructor) {
-						return new CCodeIdentifier ("self");
+						return new CCodeIdentifier (SELF_VAR_NAME);
 					} else {
 						return new CCodeConstant ("NULL");
 					}
@@ -2715,7 +2718,7 @@
 	}
 
 	public override void visit_base_access (BaseAccess expr) {
-		expr.ccodenode = new InstanceCast (new CCodeIdentifier ("self"), expr.static_type.data_type);
+		expr.ccodenode = new InstanceCast (new CCodeIdentifier (SELF_VAR_NAME), expr.static_type.data_type);
 	}
 
 	public override void visit_postfix_expression (PostfixExpression expr) {
@@ -3412,7 +3415,7 @@
 		var cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
 
 		if (d.has_target) {
-			var cparam = new CCodeFormalParameter ("self", "gpointer");
+			var cparam = new CCodeFormalParameter (SELF_VAR_NAME, "gpointer");
 			cparam_map.set (get_param_pos (d.cinstance_parameter_position), cparam);
 		}
 
@@ -3441,7 +3444,7 @@
 		}
 
 		if (m.get_error_domains ().size > 0) {
-			var cparam = new CCodeFormalParameter ("error", "GError**");
+			var cparam = new CCodeFormalParameter (ERROR_VAR_NAME, "GError**");
 			cparam_map.set (get_param_pos (-1), cparam);
 		}
 
@@ -3471,7 +3474,7 @@
 		if (m.binding == MemberBinding.INSTANCE) {
 			CCodeExpression arg;
 			if (d.has_target) {
-				arg = new CCodeIdentifier ("self");
+				arg = new CCodeIdentifier (SELF_VAR_NAME);
 			} else {
 				// use first delegate parameter as instance
 				arg = new CCodeIdentifier ((d_params.get (0).ccodenode as CCodeFormalParameter).name);
@@ -3503,7 +3506,7 @@
 		}
 
 		if (m.get_error_domains ().size > 0) {
-			carg_map.set (get_param_pos (-1), new CCodeIdentifier ("error"));
+			carg_map.set (get_param_pos (-1), new CCodeIdentifier (ERROR_VAR_NAME));
 		}
 
 		var ccall = new CCodeFunctionCall (new CCodeIdentifier (m.get_cname ()));
@@ -3566,7 +3569,7 @@
 
 		DataType instance_expression_type;
 		if (ma.inner == null) {
-			instance = new CCodeIdentifier ("self");
+			instance = new CCodeIdentifier (SELF_VAR_NAME);
 			instance_expression_type = get_data_type_for_symbol (current_type_symbol);
 		} else {
 			instance = (CCodeExpression) ma.inner.ccodenode;

=== modified file 'gobject/valaccodeinvocationexpressionbinding.vala'
--- gobject/valaccodeinvocationexpressionbinding.vala	2008-05-03 02:42:41 +0000
+++ gobject/valaccodeinvocationexpressionbinding.vala	2008-05-05 07:13:58 +0000
@@ -83,7 +83,7 @@
 
 			DataType instance_expression_type;
 			if (ma.inner == null) {
-				instance = new CCodeIdentifier ("self");
+				instance = new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME);
 				instance_expression_type = codegen.get_data_type_for_symbol (codegen.current_type_symbol);
 			} else {
 				instance = (CCodeExpression) ma.inner.ccodenode;

=== modified file 'gobject/valaccodememberaccessbinding.vala'
--- gobject/valaccodememberaccessbinding.vala	2008-05-03 02:42:41 +0000
+++ gobject/valaccodememberaccessbinding.vala	2008-05-05 07:13:58 +0000
@@ -242,7 +242,7 @@
 		DataType base_type = null;
 	
 		if (expr.inner == null) {
-			pub_inst = new CCodeIdentifier ("self");
+			pub_inst = new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME);
 
 			if (codegen.current_type_symbol != null) {
 				/* base type is available if this is a type method */

=== modified file 'gobject/valaccodemethodbinding.vala'
--- gobject/valaccodemethodbinding.vala	2008-05-03 02:42:41 +0000
+++ gobject/valaccodemethodbinding.vala	2008-05-05 07:13:58 +0000
@@ -160,7 +160,7 @@
 				if (m.parent_symbol is Struct && !((Struct) m.parent_symbol).is_simple_type ()) {
 					instance_param = new CCodeFormalParameter ("*self", this_type.get_cname ());
 				} else {
-					instance_param = new CCodeFormalParameter ("self", this_type.get_cname ());
+					instance_param = new CCodeFormalParameter (CCodeGenerator.SELF_VAR_NAME, this_type.get_cname ());
 				}
 			}
 			cparam_map.set (codegen.get_param_pos (m.cinstance_parameter_position), instance_param);
@@ -237,11 +237,11 @@
 						CCodeExpression cself = codegen.get_implicit_cast_expression (new CCodeIdentifier ("base"), base_expression_type, self_target_type);
 
 						var cdecl = new CCodeDeclaration ("%s *".printf (cl.get_cname ()));
-						cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer ("self", cself));
+						cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer (CCodeGenerator.SELF_VAR_NAME, cself));
 						
 						cinit.append (cdecl);
 					} else if (m.binding == MemberBinding.INSTANCE) {
-						var ccheckstmt = create_method_type_check_statement (m, creturn_type, cl, true, "self");
+						var ccheckstmt = create_method_type_check_statement (m, creturn_type, cl, true, CCodeGenerator.SELF_VAR_NAME);
 						ccheckstmt.line = codegen.function.line;
 						cinit.append (ccheckstmt);
 					}
@@ -322,7 +322,7 @@
 						var cdecl = new CCodeDeclaration (cl.get_cname () + "*");
 						var ccall = new CCodeFunctionCall (new CCodeIdentifier ("g_type_create_instance"));
 						ccall.add_argument (new CCodeIdentifier ("type"));
-						cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer ("self", new CCodeCastExpression (ccall, cl.get_cname () + "*")));
+						cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer (CCodeGenerator.SELF_VAR_NAME, new CCodeCastExpression (ccall, cl.get_cname () + "*")));
 						cinit.append (cdecl);
 					} else if (in_gtypeinstance_creation_method) {
 						var cl = (Class) m.parent_symbol;
@@ -330,14 +330,14 @@
 						var fundamental_class = find_fundamental_class (cl);
 						var ccall = new CCodeFunctionCall (new CCodeIdentifier (fundamental_class.default_construction_method.get_cname ()));
 						ccall.add_argument (new CCodeIdentifier (cl.get_type_id ()));
-						cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer ("self", ccall));
+						cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer (CCodeGenerator.SELF_VAR_NAME, ccall));
 						cinit.append (cdecl);
 					} else if (codegen.current_type_symbol is Class) {
 						var cl = (Class) m.parent_symbol;
 						var cdecl = new CCodeDeclaration (cl.get_cname () + "*");
 						var ccall = new CCodeFunctionCall (new CCodeIdentifier ("g_slice_new0"));
 						ccall.add_argument (new CCodeIdentifier (cl.get_cname ()));
-						cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer ("self", ccall));
+						cdecl.add_declarator (new CCodeVariableDeclarator.with_initializer (CCodeGenerator.SELF_VAR_NAME, ccall));
 						cinit.append (cdecl);
 					} else {
 						var st = (Struct) m.parent_symbol;
@@ -345,7 +345,7 @@
 						// memset needs string.h
 						codegen.string_h_needed = true;
 						var czero = new CCodeFunctionCall (new CCodeIdentifier ("memset"));
-						czero.add_argument (new CCodeIdentifier ("self"));
+						czero.add_argument (new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME));
 						czero.add_argument (new CCodeConstant ("0"));
 						czero.add_argument (new CCodeIdentifier ("sizeof (%s)".printf (st.get_cname ())));
 						cinit.append (new CCodeExpressionStatement (czero));
@@ -377,7 +377,7 @@
 			cparam_map = new HashMap<int,CCodeFormalParameter> (direct_hash, direct_equal);
 			var carg_map = new HashMap<int,CCodeExpression> (direct_hash, direct_equal);
 
-			var cparam = new CCodeFormalParameter ("self", this_type.get_cname ());
+			var cparam = new CCodeFormalParameter (CCodeGenerator.SELF_VAR_NAME, this_type.get_cname ());
 			cparam_map.set (codegen.get_param_pos (m.cinstance_parameter_position), cparam);
 			
 			var vblock = new CCodeBlock ();
@@ -396,10 +396,10 @@
 
 				vcast = new CCodeFunctionCall (new CCodeIdentifier ("%s_GET_CLASS".printf (cl.get_upper_case_cname (null))));
 			}
-			vcast.add_argument (new CCodeIdentifier ("self"));
+			vcast.add_argument (new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME));
 		
 			var vcall = new CCodeFunctionCall (new CCodeMemberAccess.pointer (vcast, m.vfunc_name));
-			carg_map.set (codegen.get_param_pos (m.cinstance_parameter_position), new CCodeIdentifier ("self"));
+			carg_map.set (codegen.get_param_pos (m.cinstance_parameter_position), new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME));
 		
 			var params = m.get_parameters ();
 			foreach (FormalParameter param in params) {
@@ -453,7 +453,7 @@
 			}
 
 			if (m.get_error_domains ().size > 0) {
-				var cparam = new CCodeFormalParameter ("error", "GError**");
+				var cparam = new CCodeFormalParameter (CCodeGenerator.ERROR_VAR_NAME, "GError**");
 				cparam_map.set (codegen.get_param_pos (-1), cparam);
 				carg_map.set (codegen.get_param_pos (-1), new CCodeIdentifier (cparam.name));
 			}
@@ -537,7 +537,7 @@
 
 			if (codegen.current_type_symbol is Class) {
 				var creturn = new CCodeReturnStatement ();
-				creturn.return_expression = new CCodeIdentifier ("self");
+				creturn.return_expression = new CCodeIdentifier (CCodeGenerator.SELF_VAR_NAME);
 				codegen.function.block.add_statement (creturn);
 			}
 		}
@@ -636,7 +636,7 @@
 		}
 
 		if (m.get_error_domains ().size > 0) {
-			var cparam = new CCodeFormalParameter ("error", "GError**");
+			var cparam = new CCodeFormalParameter (CCodeGenerator.ERROR_VAR_NAME, "GError**");
 			cparam_map.set (codegen.get_param_pos (-1), cparam);
 		}
 
@@ -774,7 +774,7 @@
 			ccall.add_argument (new CCodeConstant ("NULL"));
 		}
 		
-		var cdecl = new CCodeVariableDeclarator ("self");
+		var cdecl = new CCodeVariableDeclarator (CCodeGenerator.SELF_VAR_NAME);
 		cdecl.initializer = ccall;
 		
 		var cdeclaration = new CCodeDeclaration ("%s *".printf (cl.get_cname ()));

