Actions
Feature #1905
openAdd function: delete_Unifloat_List(Unifloat*, ...)
Start date:
10/16/2011
Due date:
% Done:
100%
Estimated time:
Published in build:
0.1.0 (svn r2)
Description
I suggest to add a new API function:
void delete_Unifloat_List(Unifloat* p1, ...);
or
void delete_Unifloats(Unifloat* p1, ...);
This should reduce the code:
delete_Unifloat(x); delete_Unifloat(y); delete_Unifloat(z); ...
to be the following:
delete_Unifloats(x, y, z, ..., NULL);
Implementation idea:
#include <stdlib.h> /* NULL */ #include <stdarg.h> /* va_list */ void delete_Unifloats(Unifloat* p1, ...) { delete_Unifloat(p1); Unifloat* p; va_list ap; va_start(ap, p1); while((p = va_arg(ap, Unifloat*)) != NULL) { delete_Unifloat(p); } va_end(ap); }
Actions