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
1 changed files with 2 additions and 1 deletions

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;