Commit 7d058a60 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

support using instance methods as static callbacks

2007-02-21  Jürg Billeter  <j@bitron.ch>

	* vala/valacallback.vala: support using instance methods as static
	  callbacks

svn path=/trunk/; revision=191
parent 503ed803
2007-02-21 Jürg Billeter <j@bitron.ch>
* vala/valacallback.vala: support using instance methods as static
callbacks
2007-02-19 Jürg Billeter <j@bitron.ch>
* vapi/glib-2.0.vala: more string functions (patch by Cayle Graumann)
......
......@@ -99,7 +99,17 @@ public class Vala.Callback : DataType {
var method_params = m.get_parameters ();
var method_params_it = method_params;
bool first = true;
foreach (FormalParameter param in parameters) {
/* use first callback parameter as instance parameter if
* an instance method is being compared to a static
* callback
*/
if (first && m.instance && !instance) {
first = false;
continue;
}
/* method is allowed to accept less arguments */
if (method_params_it == null) {
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment