Ejemplo n.º 1
0
static void collectMethodsForMethodListToSparseArray(
		struct objc_method_list *list,
		SparseArray *sarray)
{
	if (NULL != list->next)
	{
		collectMethodsForMethodListToSparseArray(list->next, sarray);
	}
	for (unsigned i=0 ; i<list->count ; i++)
	{
		//fprintf(stderr, "Adding method %s (%d)\n", sel_getName(list->methods[i].selector), PTR_TO_IDX(list->methods[i].selector->name));
		SparseArrayInsert(sarray, PTR_TO_IDX(list->methods[i].selector->name),
				(void*)&list->methods[i]);
	}
}
Ejemplo n.º 2
0
static void collectMethodsForMethodListToSparseArray(
		objc_method_list *list,
		SparseArray *sarray,
		BOOL recurse)
{
	if (recurse && (NULL != list->next))
	{
		collectMethodsForMethodListToSparseArray(list->next, sarray, YES);
	}
	for (unsigned i=0 ; i<list->size ; i++)
	{
		SparseArrayInsert(sarray, list->list[i].selector,
				(void*)&list->list[i]);
	}
}