Project

General

Profile

Actions

Feature #1905

open

Add function: delete_Unifloat_List(Unifloat*, ...)

Added by Andrey Ponomarenko over 12 years ago. Updated over 12 years ago.

Status:
Resolved
Priority:
Normal
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 #1

Updated by Andrey Ponomarenko over 12 years ago

  • Description updated (diff)
Actions #2

Updated by Anton Kirilenko over 12 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
  • Published in build set to 0.1.0 (svn r2)
Actions

Also available in: Atom PDF