Add a new function 'FcPatternRefCount'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


I propose adding the following function to libfontconfig:

int FcPatternRefCount(FcPattern const *const p)
    if ( !p ) return 0;
    return p->ref.count;

so that we can destroy an FcPattern as follows:

    while ( FcPatternRefCount(p) ) FcPatternDestroy(p);

Actually just as I'm writing this, I realise that there would be a
race condition if two threads are simultaneously calling
FcPatternRefCount. So instead maybe just have:

    int FcPatternDestroyAll(FcPattern*);

which would destroy them all.

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux