Help for this page
struct NestedLoopList { int elem_size; ... struct NestedLoopFuncArg func; } ptr; };
struct NestedLoopArg* args = (NestedLoopArg*)calloc(2, sizeof(NestedLo +opArg)); ... NestedLoops(args); ... free memory allocated for args ...
struct NestedLoopList list; if ((*arg_ptr).ptr_type == 0) ... struct NestedLoopFuncArg* func_ptr = (*arg_ptr).ptr; (*(*func_ptr).ptr)(&list, (*func_ptr).pad); }
struct MyFuncPad { int count; ... (*list_ptr).ptr = array; (*list_ptr).free_ptr = 1; }
/* Convert the pointer to an int since ++ and other */ /* arithmentic operators are overloaded for pointers */ ... ...work with elem_ptr... }
struct ElementType { int size; ... struct NestedLoopFuncArg func; } ptr; };
struct NestedLoopArg* arg = (NestedLoopArg*)calloc(2, sizeof(NestedLoo +pArg)); ... NestedLoops(args); ... free memory allocated for args ...
struct NestedLoopList list; ... break; } }
struct MyFuncPad { int count; ... (*list_ptr).free_ptr = 1; (*list_ptr).free_elems = 1; }
Element* elem_ptr = list.ptr; ... free(list.ptr); list.ptr = NULL; }
if (list.free_elems) { int i; ... if (list.free_ptr) { free(list.ptr); }
www.com | www.net | www.org
No recent polls found