library/src/events/BP-Events.cc
// Initializes the mgr->events_polled_for_main_loop hash registry with an empty/correct structure.
Initializes the mgr->events_polled_for_main_loop hash registry with an empty/correct structure.
Initializes the mgr - > events_polled_for_main_loop hash registry with an empty / correct structure .
BP_ERROR_T BP_EventMgrEventsPolledHashRegInit(P_BP_EVENT_MANAGER mgr)
{
	if(!mgr)
		return ERR_FAILURE;
	if(mgr->events_polled_for_main_loop)
		return ERR_FAILURE;
	mgr->events_polled_for_main_loop = BP_CreateHashTableRegistry();
	if(!mgr->events_polled_for_main_loop)
		return ERR_FAILURE;
	char *table_path[10];
	BP_ZERO_STACK(table_path);
	size_t table_path_idx = 0;
	table_path[table_path_idx] = "events"; table_path_idx++;
	if(!BP_HashRegAddTableByPath(mgr->events_polled_for_main_loop, table_path))
	{
		return ERR_FAILURE;
	}
	return ERR_SUCCESS;
}
BP_ERROR_T BP_EventMgrEventsPolledHashRegInit ( P_BP_EVENT_MANAGER mgr ) { if ( ! mgr ) return ERR_FAILURE ; if ( mgr -> events_polled_for_main_loop ) return ERR_FAILURE ; mgr -> events_polled_for_main_loop = BP_CreateHashTableRegistry ( ) ; if ( ! mgr -> events_polled_for_main_loop ) return ERR_FAILURE ; char * table_path [ 10 ] ; BP_ZERO_STACK ( table_path ) ; size_t table_path_idx = 0 ; table_path [ table_path_idx ] = " " ; table_path_idx ++ ; if ( ! BP_HashRegAddTableByPath ( mgr -> events_polled_for_main_loop , table_path ) ) { return ERR_FAILURE ; } return ERR_SUCCESS ; }
Initializes the mgr->events_polled_for_main_loop hash registry with an empty/correct structure.
Initializes the mgr - > events_polled_for_main_loop hash registry with an empty / correct structure .
// ensure we have a manager // if we already have a hash table, exit // create new hash table registry // create arbitrary table path // table path idx // set events table // attempt to add the table by specified path // return indicating success