From: Patrick Lam Date: Thu, 20 Oct 2005 20:50:21 +0000 (+0000) Subject: Add valist sentinel markup for FcObjectSetBuild and FcPatternBuild. X-Git-Tag: fc-2_3_92~20 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=250c1cd422ce6260ff58f2699043556d93729ef7;p=fontconfig.git Add valist sentinel markup for FcObjectSetBuild and FcPatternBuild. reviewed by: plam --- diff --git a/ChangeLog b/ChangeLog index 10a3d46..2a37be5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,11 @@ -2005-10-14 Ross Burton +2005-10-20 Marcus Meissner + reviewed by: plam + + * fontconfig/fontconfig.h: + + Add valist sentinel markup for FcObjectSetBuild and FcPatternBuild. + +2005-10-14 Ross Burton reviewed by: plam * fc-glyphname/fc-glyphname.c: diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h index 2ffcb24..d74088d 100644 --- a/fontconfig/fontconfig.h +++ b/fontconfig/fontconfig.h @@ -27,6 +27,12 @@ #include +#if defined(__GNUC__) && (__GNUC__ >= 4) +#define FC_ATTRIBUTE_SENTINEL(x) __attribute__((__sentinel__(0))) +#else +#define FC_ATTRIBUTE_SENTINEL(x) +#endif + typedef unsigned char FcChar8; typedef unsigned short FcChar16; typedef unsigned int FcChar32; @@ -534,7 +540,7 @@ FcObjectSet * FcObjectSetVaBuild (const char *first, va_list va); FcObjectSet * -FcObjectSetBuild (const char *first, ...); +FcObjectSetBuild (const char *first, ...) FC_ATTRIBUTE_SENTINEL(0); FcFontSet * FcFontSetList (FcConfig *config, @@ -751,7 +757,7 @@ FcPattern * FcPatternVaBuild (FcPattern *orig, va_list va); FcPattern * -FcPatternBuild (FcPattern *orig, ...); +FcPatternBuild (FcPattern *orig, ...) FC_ATTRIBUTE_SENTINEL(0); /* fcstr.c */ @@ -853,4 +859,6 @@ FcConfigParseAndLoad (FcConfig *config, const FcChar8 *file, FcBool complain); _FCFUNCPROTOEND +#undef FC_ATTRIBUTE_SENTINEL + #endif /* _FONTCONFIG_H_ */