Commit 866ba2d02a64253125f6281c070a0896ee242216

Thomas de Grivel 2024-08-08T13:13:52

http_event.h: heap-allocation functions

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/http/http_event.c b/http/http_event.c
index fd31c9e..d5bb084 100644
Binary files a/http/http_event.c and b/http/http_event.c differ
diff --git a/http/http_event.h b/http/http_event.h
index 62492cd..fa22bb4 100644
--- a/http/http_event.h
+++ b/http/http_event.h
@@ -15,8 +15,11 @@
 
 #include "types.h"
 
+/* Heap-allocation functions, call http_event_delete after use. */
+void           http_event_delete (struct event *ev);
+struct event * http_event_new (s32 fd, s16 event, const s_cfn *cfn,
+                               s_tag *arg);
+
 s32  http_event_add (struct event *ev, s_time *time);
-void http_event_set (struct event *ev, s32 fd, s16 event,
-                     const s_cfn *cfn, s_tag *arg);
 
 #endif /* HTTP_H */