diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-15 22:29:58 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-15 22:29:58 +0200 |
commit | ebda48e66584c562d3c1f44693b0041fca36e926 (patch) | |
tree | 3523ccb52d9b3a1494ba49933b0e3cbfddad9f78 /util.h | |
parent | 0f26b71433c96b1705279a96add89b325bd58efb (diff) |
Move the DEFINE_GMP_OPERATION macro to util.h.
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -0,0 +1,13 @@ +#define DEFINE_GMP_OPERATION(SIGNATURE, TYPE, GMPOP, OBJTYPE, CONSTRUCTOR) \ + -(OBJTYPE *) SIGNATURE \ + { \ + TYPE##_t mpval; \ + OBJTYPE *result; \ + \ + TYPE##_init (mpval); \ + GMPOP; \ + result = [OBJTYPE CONSTRUCTOR mpval]; \ + TYPE##_clear (mpval); \ + \ + return result; \ + } |