Add function to extract algorithm number from context.

This commit is contained in:
Giovanni Bajo
2012-04-25 18:03:24 +02:00
committed by Simon Kelley
parent 3471f18130
commit 6759b99e28
2 changed files with 9 additions and 0 deletions

View File

@@ -201,3 +201,11 @@ void verifyalg_free(VerifyAlgCtx *a)
pool_used &= ~(1 << pool_idx);
}
int verifyalg_algonum(VerifyAlgCtx *a)
{
int num = a->vtbl - valgs;
if (num < 0 || num >= countof(valgs))
return -1;
return num;
}