This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via ab15bc2a2e7b7636d7e0481251615c360de17c3f (commit) from 94a7d269628a94cf585ed33951bac25b370f20cc (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/ab15bc2a2e7b7636d7e0481251615c360de17...
commit ab15bc2a2e7b7636d7e0481251615c360de17c3f Author: Cyril Hrubis metan@ucw.cz Date: Sun May 22 10:59:41 2011 +0200
Fix the FnPerBpp macro (now with GNU preprocessor extensions).
diff --git a/core/GP_FnPerBpp.h b/core/GP_FnPerBpp.h index 712d3b0..0e3da13 100644 --- a/core/GP_FnPerBpp.h +++ b/core/GP_FnPerBpp.h @@ -30,55 +30,50 @@ * of the specified function depending on the bit depth of the context. * Extra arguments are arguments to be passed to the function. * Returns GP_ENOIMPL if the bit depth is unknown. - * - * Note: Relying on existing context variable is ugly and broken, I know... - * But I hate doing just another GP_FN_PER_BPP macro for functions - * that takes context as it's only argument. Or passing the context - * twice or whatever else. */ -#define GP_FN_PER_BPP(FN_NAME, ...) +#define GP_FN_PER_BPP(FN_NAME, context, args ...) switch (context->bpp) { case 1: - FN_NAME##1bpp(__VA_ARGS__); + FN_NAME##1bpp(context, ##args); break; case 2: - FN_NAME##2bpp(__VA_ARGS__); + FN_NAME##2bpp(context, ##args); break; case 4: - FN_NAME##4bpp(__VA_ARGS__); + FN_NAME##4bpp(context, ##args); break; case 8: - FN_NAME##8bpp(__VA_ARGS__); + FN_NAME##8bpp(context, ##args); break; case 16: - FN_NAME##16bpp(__VA_ARGS__); + FN_NAME##16bpp(context, ##args); break; case 24: - FN_NAME##24bpp(__VA_ARGS__); + FN_NAME##24bpp(context, ##args); break; case 32: - FN_NAME##32bpp(__VA_ARGS__); + FN_NAME##32bpp(context, ##args); break; default: break; } -#define GP_FN_RET_PER_BPP(FN_NAME, ...) +#define GP_FN_RET_PER_BPP(FN_NAME, context, args ...) switch (context->bpp) { case 1: - return FN_NAME##1bpp(__VA_ARGS__); + return FN_NAME##1bpp(context, ##args); case 2: - return FN_NAME##2bpp(__VA_ARGS__); + return FN_NAME##2bpp(context, ##args); case 4: - return FN_NAME##4bpp(__VA_ARGS__); + return FN_NAME##4bpp(context, ##args); case 8: - return FN_NAME##8bpp(__VA_ARGS__); + return FN_NAME##8bpp(context, ##args); case 16: - return FN_NAME##16bpp(__VA_ARGS__); + return FN_NAME##16bpp(context, ##args); case 24: - return FN_NAME##24bpp(__VA_ARGS__); + return FN_NAME##24bpp(context, ##args); case 32: - return FN_NAME##32bpp(__VA_ARGS__); + return FN_NAME##32bpp(context, ##args); }
-----------------------------------------------------------------------
Summary of changes: core/GP_FnPerBpp.h | 37 ++++++++++++++++--------------------- 1 files changed, 16 insertions(+), 21 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.