Skip to content

Commit

Permalink
cdefs: fix lypy_log_cb prototype
Browse files Browse the repository at this point in the history
The following error is raised when logging:
> File "/usr/lib/python3/dist-packages/libyang/log.py", line 59, in configure_logging
> TypeError: initializer for ctype 'void(*)(LY_LOG_LEVEL, char *, char *, char *,
>                uint64_t)' must be a pointer to same type, not cdata 'void(*)(LY_LOG_LEVEL, char *, char
>                *)'

Fix lypy_log_cb's prototype.

Fixes: 3849dd523d30 ("Port to libyang3")
Signed-off-by: Jeremie Leska <[email protected]>
Signed-off-by: Samuel Gauthier <[email protected]>
  • Loading branch information
jeremie6wind authored and samuel-gauthier committed Apr 16, 2024
1 parent ae31525 commit e602016
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cffi/cdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ enum ly_stmt {
int ly_log_options(int);

LY_LOG_LEVEL ly_log_level(LY_LOG_LEVEL);
extern "Python" void lypy_log_cb(LY_LOG_LEVEL, const char *, const char *);
extern "Python" void lypy_log_cb(LY_LOG_LEVEL, const char *, const char *, const char *, uint64_t);
void ly_set_log_clb(void (*)(LY_LOG_LEVEL, const char *, const char *, const char *, uint64_t));
const struct ly_err_item *ly_err_first(const struct ly_ctx *);
const struct ly_err_item *ly_err_last(const struct ly_ctx *);
Expand Down

0 comments on commit e602016

Please sign in to comment.