Type json improvements

This commit is contained in:
JoelKatz
2012-10-01 00:55:16 -07:00
parent b973f3509c
commit c6aa3b2678
5 changed files with 34 additions and 7 deletions

View File

@@ -100,14 +100,20 @@ TransactionFormat InnerTxnFormats[]=
{ NULL, ttINVALID }
};
TransactionFormat* getTxnFormat(TransactionType t)
TransactionFormat* getTxnFormat(TransactionType t)
{
TransactionFormat* f = InnerTxnFormats;
while (f->t_name != NULL)
return getTxnFormat(t);
}
TransactionFormat* getTxnFormat(int t)
{
TransactionFormat* f = InnerTxnFormats;
while (f->t_name != NULL)
{
if (f->t_type == t) return f;
if (f->t_type == t)
return f;
++f;
}
return NULL;
return NULL;
}
// vim:ts=4