doc: Add serial to list of ci file reserved words
[charm.git] / src / conv-core / futures.c
index 66659bda7cdd0b93c2960c5075e74b2ddecae5d4..f81aa3c6f16c63d8f34d82e244495b675c40d2bb 100644 (file)
@@ -1,3 +1,5 @@
+#include <stdlib.h>
+#include <string.h>
 #include "converse.h"
 
 typedef struct Cfuture_data_s
@@ -17,7 +19,7 @@ typedef struct CfutureValue_s
 }
 *CfutureValue;
 
-#define field_offset(t, f) ((CMK_SIZE_T)(((t)0)->f))
+#define field_offset(t, f) ((size_t)(((t)0)->f))
 #define void_to_value(v) ((CfutureValue)(((char*)v)-field_offset(CfutureValue,rest)))
 
 CpvDeclare(int, CfutureStoreIndex);
@@ -47,7 +49,6 @@ static void CfutureAwaken(futdata data, CfutureValue val)
 
 static void CfutureStore(CfutureValue m)
 {
-  CmiGrabBuffer((void **)&m);
   CfutureAwaken(m->data, m);
 }
 
@@ -118,5 +119,5 @@ void CfutureDestroy(Cfuture f)
 void CfutureModuleInit()
 {
   CpvInitialize(int, CfutureStoreIndex);
-  CpvAccess(CfutureStoreIndex) = CmiRegisterHandler(CfutureStore);
+  CpvAccess(CfutureStoreIndex) = CmiRegisterHandler((CmiHandler)CfutureStore);
 }