aboutsummaryrefslogtreecommitdiff
path: root/include/u.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/u.h')
-rw-r--r--include/u.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/u.h b/include/u.h
index b7bd9ca..c03d545 100644
--- a/include/u.h
+++ b/include/u.h
@@ -51,6 +51,8 @@ typedef intptr_t intptr;
typedef int error;
+typedef void* Iface;
+
#define nil NULL
// ----------------------------------------------------------------------------
@@ -90,9 +92,9 @@ void _bufpop(void*, int, vlong);
typedef struct coro coro;
-coro* coro·new(uintptr stk, uintptr (*func)(coro* c, uintptr));
-uintptr coro·yield(coro* c, uintptr arg);
-error coro·free(coro* c);
+coro* coro·new(uintptr stk, uintptr (*func)(coro*, uintptr));
+uintptr coro·yield(coro *c, uintptr arg);
+error coro·free(coro *c);
// -----------------------------------------------------------------------------
// Strings
@@ -107,10 +109,10 @@ error coro·free(coro* c);
// ------------------------------------------------------------------
// Global macros
-#ifndef RELEASE
-#define Assert(x) assert(x)
-#else
+#ifdef RELEASE
#define Assert(x)
+#else
+#define Assert(x) assert(x)
#endif
#define arrlen(Array) (sizeof(Array) / sizeof((Array)[0]))