library/src/datastructures/BP-HashTable.cc
// Attempts to destroy the table at the element pointer, recursing
// into the path and destroying all data recursively inward till
// finally destroying itself.  This requires that everything in the
// hive is unlocked, or the request will fail with ERR_FAILURE. This
// is primarily called via BP_HashRegDestroyTableByPath.
Attempts to destroy the table at the element pointer, recursing
into the path and destroying all data recursively inward till
finally destroying itself.  This requires that everything in the
hive is unlocked, or the request will fail with ERR_FAILURE. This
is primarily called via BP_HashRegDestroyTableByPath.
Attempts to destroy the table at the element pointer recursing into the path and destroying all data recursively inward till finally destroying itself . This requires that everything in the hive is unlocked or the request will fail with ERR_FAILURE . This is primarily called via BP_HashRegDestroyTableByPath .
BP_ERROR_T BP_HashRegDestroyTable
(
	P_BP_HASH_TABLE_REGISTRY hreg,
	P_BP_HASH_TABLE_KEYED_ENTRY table
)
{
	BP_GLOBAL_HASH_TABLE_OVERRIDE(ERR_FAILURE);
	if(!table)
		return ERR_FAILURE;
	if(BP_HashRegCheckOutTable(hreg, table, BP_TRUE) != ERR_SUCCESS)
	{
		return ERR_FAILURE;
	}
	if(table->type != BP_HASH_TABLE_KEYED_ENTRY_TYPE_NAMED_HASH_TABLE)
		return ERR_FAILURE;
	return BP_HashRegDestroyTable_r
	(
		hreg,
		table
	);
}
BP_ERROR_T BP_HashRegDestroyTable ( P_BP_HASH_TABLE_REGISTRY hreg , P_BP_HASH_TABLE_KEYED_ENTRY table ) { BP_GLOBAL_HASH_TABLE_OVERRIDE ( ERR_FAILURE ) ; if ( ! table ) return ERR_FAILURE ; if ( BP_HashRegCheckOutTable ( hreg , table , BP_TRUE ) != ERR_SUCCESS ) { return ERR_FAILURE ; } if ( table -> type != BP_HASH_TABLE_KEYED_ENTRY_TYPE_NAMED_HASH_TABLE ) return ERR_FAILURE ; return BP_HashRegDestroyTable_r ( hreg , table ) ; }
Attempts to destroy the table at the element pointer, recursing
into the path and destroying all data recursively inward till
finally destroying itself.
Attempts to destroy the table at the element pointer recursing into the path and destroying all data recursively inward till finally destroying itself .
// macro to override hreg on null // ensure we have a table // Ensure we can check out the table before continuing.  Since checkouts cascade // ensure it's actually a table and not just some random // pointer. // verbosity // printf("\n Destroying table %p ", table); // run the recursive table destruction routine