struct NestedLoopList list; if ((*arg_ptr).ptr_type == 0) { /* array */ struct NestedLoopArrayArg* array_ptr = (*arg_ptr).ptr; list.elem_size = (*array_ptr).elem_size; list.length = (*array_ptr).length; list.ptr = (*array_ptr).ptr; list.free_ptr = 0; } else { /* function */ struct NestedLoopFuncArg* func_ptr = (*arg_ptr).ptr; (*(*func_ptr).ptr)(&list, (*func_ptr).pad); }