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