tevent: Flow: pass function name to tevent_req_create()
authorPavel Filipenský <pfilipen@redhat.com>
Sat, 18 Jun 2022 08:57:11 +0000 (10:57 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 19 Jul 2023 08:02:33 +0000 (08:02 +0000)
Note the tevent-0.14.1.sigs changes will be reverted in
the 'tevent 0.15.0' commit.

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/tevent/ABI/tevent-0.14.1.sigs
lib/tevent/tevent.h
lib/tevent/tevent_req.c
lib/tevent/wscript

index f2a11902a8091861640ce8cbe27c1802fafdfa97..557f2d3619dbe9b56be3b1d2c2036a340ac3501f 100644 (file)
@@ -1,3 +1,4 @@
+__tevent_req_create: struct tevent_req *(TALLOC_CTX *, void *, size_t, const char *, const char *, const char *)
 _tevent_add_fd: struct tevent_fd *(struct tevent_context *, TALLOC_CTX *, int, uint16_t, tevent_fd_handler_t, void *, const char *, const char *)
 _tevent_add_signal: struct tevent_signal *(struct tevent_context *, TALLOC_CTX *, int, int, tevent_signal_handler_t, void *, const char *, const char *)
 _tevent_add_timer: struct tevent_timer *(struct tevent_context *, TALLOC_CTX *, struct timeval, tevent_timer_handler_t, void *, const char *, const char *)
index 5db3230459c1bcaa23791d9e75a27db25ad7b4da..514e127cc3886eac323ed1448678e486e43a080c 100644 (file)
@@ -1271,9 +1271,20 @@ struct tevent_req *_tevent_req_create(TALLOC_CTX *mem_ctx,
                                      const char *type,
                                      const char *location);
 
+struct tevent_req *__tevent_req_create(TALLOC_CTX *mem_ctx,
+                                      void *pstate,
+                                      size_t state_size,
+                                      const char *type,
+                                      const char *func,
+                                      const char *location);
+
 #define tevent_req_create(_mem_ctx, _pstate, _type) \
-       _tevent_req_create((_mem_ctx), (_pstate), sizeof(_type), \
-                          #_type, __location__)
+       __tevent_req_create((_mem_ctx),             \
+                           (_pstate),              \
+                           sizeof(_type),          \
+                           #_type,                 \
+                           __func__,               \
+                           __location__)
 #endif
 
 /**
index e76863b2170c98c4d86a4bbc15cb090b2eb5d14e..10e9812ad0fbe16c5b7e7131311b5bfc03ec35e5 100644 (file)
@@ -63,6 +63,21 @@ struct tevent_req *_tevent_req_create(TALLOC_CTX *mem_ctx,
                                    size_t data_size,
                                    const char *type,
                                    const char *location)
+{
+       return __tevent_req_create(mem_ctx,
+                                  pdata,
+                                  data_size,
+                                  type,
+                                  NULL,
+                                  location);
+}
+
+struct tevent_req *__tevent_req_create(TALLOC_CTX *mem_ctx,
+                                      void *pdata,
+                                      size_t data_size,
+                                      const char *type,
+                                      const char *func,
+                                      const char *location)
 {
        struct tevent_req *req;
        struct tevent_req *parent;
index bed4b6a80af65bad3a3def2d9756bd317a5d9d24..369f1c92ca3f9ac5ac2468ecb5b06598c1ab8664 100644 (file)
@@ -110,7 +110,7 @@ def build(bld):
                           enabled= not bld.CONFIG_SET('USING_SYSTEM_TEVENT'),
                           includes='.',
                           abi_directory='ABI',
-                          abi_match='tevent_* _tevent_*',
+                          abi_match='tevent_* _tevent_* __tevent_*',
                           vnum=VERSION,
                           public_headers=('' if private_library else 'tevent.h'),
                           public_headers_install=not private_library,