assert that argument types are all properly registered.

This commit is contained in:
Enno Rehling 2005-06-13 20:25:07 +00:00
parent 2e9f1954fe
commit 686dfacc02
1 changed files with 5 additions and 1 deletions

View File

@ -62,8 +62,12 @@ mt_new(const char * name, const char * args[])
char * cp = strncpy((char*)malloc(spos-x+1), x, spos-x); char * cp = strncpy((char*)malloc(spos-x+1), x, spos-x);
cp[spos-x] = '\0'; cp[spos-x] = '\0';
mtype->pnames[i] = cp; mtype->pnames[i] = cp;
/* optimierung: Typ-Strings zentral verwalten. */
mtype->types[i] = find_argtype(spos+1); mtype->types[i] = find_argtype(spos+1);
if (mtype->types[i]==NULL) {
log_error(("unknown argument type %s for message type %s\n",
spos+1, mtype->name));
}
assert(mtype->types[i]);
} }
} }
return mtype; return mtype;