[MLton-commit] r4804
Matthew Fluet
fluet at mlton.org
Sun Nov 5 07:31:15 PST 2006
Can't use C-types with C-codegen
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c 2006-11-03 22:47:30 UTC (rev 4803)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gen/gen-types.c 2006-11-05 15:31:10 UTC (rev 4804)
@@ -150,12 +150,13 @@
#define booltype(t, bt, name) \
do { \
writeString (cTypesHFd, "typedef "); \
+ writeString (cTypesHFd, " /* "); \
writeString (cTypesHFd, #t); \
- writeString (cTypesHFd, " /* "); \
+ writeString (cTypesHFd, " */ "); \
writeString (cTypesHFd, bt); \
writeUintmaxU (cTypesHFd, CHAR_BIT * sizeof(t)); \
writeString (cTypesHFd, "_t"); \
- writeString (cTypesHFd, " */ "); \
+ writeString (cTypesHFd, " "); \
writeString (cTypesHFd, "C_"); \
writeString (cTypesHFd, name); \
writeString (cTypesHFd, "_t;"); \
@@ -183,12 +184,13 @@
for (size_t i = 0; i < strlen(btUpper); i++) \
btUpper[i] = (char)(toupper((int)(bt[i]))); \
writeString (cTypesHFd, "typedef "); \
+ writeString (cTypesHFd, " /* "); \
writeString (cTypesHFd, #t); \
- writeString (cTypesHFd, " /* "); \
+ writeString (cTypesHFd, " */ "); \
writeString (cTypesHFd, bt); \
writeUintmaxU (cTypesHFd, CHAR_BIT * sizeof(t)); \
writeString (cTypesHFd, "_t"); \
- writeString (cTypesHFd, " */ "); \
+ writeString (cTypesHFd, " "); \
writeString (cTypesHFd, "C_"); \
writeString (cTypesHFd, name); \
writeString (cTypesHFd, "_t;"); \
@@ -230,10 +232,11 @@
#define ptrtype(t, name) \
do { \
writeString (cTypesHFd, "typedef "); \
+ writeString (cTypesHFd, " /* "); \
writeString (cTypesHFd, #t); \
- writeString (cTypesHFd, " /* "); \
+ writeString (cTypesHFd, " */ "); \
writeString (cTypesHFd, "Pointer"); \
- writeString (cTypesHFd, " */ "); \
+ writeString (cTypesHFd, " "); \
writeString (cTypesHFd, "C_"); \
writeString (cTypesHFd, name); \
writeString (cTypesHFd, "_t;"); \
More information about the MLton-commit
mailing list