+print_type(FILE *fp, Type *t, gboolean postfix_to_stars)
+{
+ char *s;
+ int i;
+ int extra;
+
+ s = remove_sep(t->name);
+ out_printf(fp,"%s ",s);
+ g_free(s);
+
+ extra = 0;
+ if(postfix_to_stars) {
+ char *p;
+ /*XXX: this is ugly perhaps we can do this whole postfix thing
+ in a nicer way, we just count the number of '[' s and from that
+ we deduce the number of dimensions */
+ for(p=t->postfix; p && *p; p++)
+ if(*p == '[') extra++;
+ }
+
+ for(i=0;i<(t->stars+extra);i++)
+ out_printf(fp,"*");
+}
+
+static void
+print_method(FILE *fp, char *typeprefix, char *nameprefix,
+ char *namepostfix,char *postfix, Method *m,
+ gboolean no_funcbase)
+{
+ GList *li;
+
+ out_printf(fp,"%s",typeprefix);
+ print_type(fp,m->mtype,TRUE);
+ if(no_funcbase)
+ out_printf(fp,"%s%s%s(",
+ nameprefix,m->id,namepostfix);
+ else
+ out_printf(fp,"%s%s_%s%s(",
+ nameprefix,funcbase,m->id,namepostfix);
+
+ if(m->args) {
+ for(li=m->args;li;li=g_list_next(li)) {
+ FuncArg *arg = li->data;
+ print_type(fp,arg->atype,FALSE);
+ if(li->next)
+ out_printf(fp,"%s%s, ",arg->name,
+ arg->atype->postfix?
+ arg->atype->postfix:"");
+ else
+ out_printf(fp,"%s%s",arg->name,
+ arg->atype->postfix?
+ arg->atype->postfix:"");
+ }
+ if(m->vararg)
+ out_printf(fp,", ...");
+ } else {
+ out_printf(fp,"void");
+ }
+ out_printf(fp,")%s",postfix);
+}
+
+
+static void
+make_method_pointers(Class *c)