diff --git a/lang/el-compiler/runtime/el_runtime.h b/lang/el-compiler/runtime/el_runtime.h index c0529ef..88c2a36 100644 --- a/lang/el-compiler/runtime/el_runtime.h +++ b/lang/el-compiler/runtime/el_runtime.h @@ -52,6 +52,12 @@ typedef int64_t el_val_t; +/* HTTP request-handler function-pointer types. Public because soul modules (routes/chat/etc.) + * register handlers across translation units; previously defined only inside el_runtime.c, which + * made cross-module references (and the Windows build) fail. Home in the shared header. */ +typedef el_val_t (*http_handler_fn)(el_val_t method, el_val_t path, el_val_t body); +typedef el_val_t (*http_handler4_fn)(el_val_t method, el_val_t path, el_val_t body, el_val_t headers); + #define EL_STR(s) ((el_val_t)(uintptr_t)(s)) #define EL_CSTR(v) ((const char*)(uintptr_t)(v)) #define EL_INT(v) (v)