From 7a94452294ea68fa657c7ce1fa204c77062006c5 Mon Sep 17 00:00:00 2001 From: krasimir Date: Sun, 28 Jul 2002 13:55:32 +0000 Subject: [PATCH] [project @ 2002-07-28 13:55:32 by krasimir] add `size` macro --- ghc/utils/hsc2hs/template-hsc.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ghc/utils/hsc2hs/template-hsc.h b/ghc/utils/hsc2hs/template-hsc.h index fdd4b76..bdc34ed 100644 --- a/ghc/utils/hsc2hs/template-hsc.h +++ b/ghc/utils/hsc2hs/template-hsc.h @@ -69,6 +69,9 @@ #define hsc_offset(t, f) \ printf("(%ld)", (long) offsetof (t, f)); +#define hsc_size(t) \ + printf("(%ld)", (long) sizeof(t)); + #define hsc_enum(t, f, print_name, x) \ print_name; \ printf (" :: %s\n", #t); \ -- 1.7.10.4