mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-30 13:01:23 +03:00
callbacks: Add support for MSVC
__typeof__ is GCC specific Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -487,14 +487,12 @@ typedef struct ssh_socket_callbacks_struct *ssh_socket_callbacks;
|
||||
do { \
|
||||
struct ssh_iterator *_cb_i = ssh_list_get_iterator(_cb_list); \
|
||||
_cb_type _cb; \
|
||||
__typeof__(_cb->_cb_name) _cb_p; \
|
||||
for (; _cb_i != NULL; _cb_i = _cb_i->next) { \
|
||||
_cb = ssh_iterator_value(_cb_type, _cb_i); \
|
||||
if (ssh_callbacks_exists(_cb, _cb_name) && \
|
||||
(_cb_p = _cb->_cb_name))
|
||||
if (ssh_callbacks_exists(_cb, _cb_name))
|
||||
|
||||
#define ssh_callbacks_iterate_exec(...) \
|
||||
_cb_p(__VA_ARGS__, _cb->userdata)
|
||||
#define ssh_callbacks_iterate_exec(_cb_name, ...) \
|
||||
_cb->_cb_name(__VA_ARGS__, _cb->userdata)
|
||||
|
||||
#define ssh_callbacks_iterate_end() \
|
||||
} \
|
||||
|
||||
Reference in New Issue
Block a user