Do not count unimplemented methods.

The method emitter skips unimplemented methods, so counting them when
figuring out how many methods to emit leads to a segfault.
This commit is contained in:
Bill Currie 2011-02-04 08:26:16 +09:00
parent e04ed72afa
commit 993bee4f59

View file

@ -462,7 +462,8 @@ emit_methods (methodlist_t *methods, const char *name, int instance)
warning (0, "Method `%c%s' not implemented",
m->instance ? '-' : '+', m->name);
}
count++;
if (m->def)
count++;
}
if (!count)
return 0;