I have experienced a cinterop problem: in this fil...
# kotlin-native
i
I have experienced a cinterop problem: in this file, https://gist.github.com/666796f4cc82870187e680c6c887abe7, it ignored 2 functions:
Copy code
CZMQ_EXPORT int
    zloop_reader (zloop_t *self, zsock_t *sock, zloop_reader_fn handler, void *arg);
and
Copy code
CZMQ_EXPORT int
    zloop_timer (zloop_t *self, size_t delay, size_t times, zloop_timer_fn handler, void *arg);
Is it a known problem, or I should leave an issue on YouTrack?
I have localized the problem. It's in handling functions taking a callback like:
Copy code
typedef int (zloop_timer_fn) (
    zloop_t *loop, int timer_id, void *arg);
s
Hi! Can you share a complete reproducer, please? The given file is not enough because there are no declarations for
zloop_t
,
zsock_t
and other types.
i
The problem was in the header.
It passed a function pointer without
*
like:
void f(int (g)())
instead of
void f(int (*g)())