function pointer whitelists on data types.

git-svn-id: file:///svn/unbound/trunk@660 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards
2007-10-05 11:41:12 +00:00
parent 9a60182c86
commit 2a547a35a7
32 changed files with 461 additions and 246 deletions
+17
View File
@@ -830,3 +830,20 @@ checklock_thrjoin(pthread_t thread)
}
#endif /* USE_THREAD_DEBUG */
int order_lock_cmp(const void* e1, const void* e2)
{
struct order_id* o1 = (struct order_id*)e1;
struct order_id* o2 = (struct order_id*)e2;
if(o1->thr < o2->thr) return -1;
if(o1->thr > o2->thr) return 1;
if(o1->instance < o2->instance) return -1;
if(o1->instance > o2->instance) return 1;
return 0;
}
int
codeline_cmp(const void* a, const void* b)
{
return strcmp((const char*)a, (const char*)b);
}