Feature #1905
Updated by Andrey Ponomarenko about 13 years ago
I suggest to add a new API function: <pre> void delete_Unifloat_List(Unifloat* p1, ...); </pre> or <pre> void delete_Unifloats(Unifloat* p1, ...); </pre> This should reduce the code: <pre> delete_Unifloat(x); delete_Unifloat(y); delete_Unifloat(z); ... </pre> to be the following: <pre> delete_Unifloats(x, y, z, ..., NULL); </pre> Implementation idea: <pre> #include <stdlib.h> /* NULL */ #include <stdarg.h> /* va_list */ void delete_Unifloats(Unifloat* p1, ...) { delete_Unifloat(p1); Unifloat* p; delete_Unifloat(p1); va_list ap; va_start(ap, p1); while((p = va_arg(ap, Unifloat*)) != NULL) { delete_Unifloat(p); } va_end(ap); } </pre>