library/src/datastructures/BP-HashTable.cc
// lookup an entry based on a provided address
lookup an entry based on a provided address
lookup an entry based on a provided address
P_BP_HASH_TABLE_MEM_PTR_ENTRY BP_HashRegMemPtrFind
(
	P_BP_HASH_TABLE_REGISTRY hreg,
	void *addr
)
{
	BP_GLOBAL_HASH_TABLE_OVERRIDE(NULL);
	if(!hreg->memory_table)
		return NULL;
	if(!addr)
		return NULL;
	P_BP_HASH_TABLE_MEM_PTR_ENTRY found = NULL;
	HASH_FIND_PTR(hreg->memory_table->entries, &addr, found);
	return found;
}
P_BP_HASH_TABLE_MEM_PTR_ENTRY BP_HashRegMemPtrFind ( P_BP_HASH_TABLE_REGISTRY hreg , void * addr ) { BP_GLOBAL_HASH_TABLE_OVERRIDE ( NULL ) ; if ( ! hreg -> memory_table ) return NULL ; if ( ! addr ) return NULL ; P_BP_HASH_TABLE_MEM_PTR_ENTRY found = NULL ; HASH_FIND_PTR ( hreg -> memory_table -> entries , & addr , found ) ; return found ; }
lookup an entry based on a provided address
lookup an entry based on a provided address
// macro to override hreg on null // value which will be returned // attempt to find the address // return the found item