Improve some debug

This commit is contained in:
Wim Taymans 2019-10-02 18:02:07 +02:00
parent 6e0ffb0c47
commit e04d58ee3a
12 changed files with 24 additions and 21 deletions

View file

@ -36,7 +36,7 @@ extern "C" {
#define spa_debug(...) ({ fprintf(stderr, __VA_ARGS__);fputc('\n', stderr); })
#endif
int spa_debug_port_info(int indent, const struct spa_port_info *info)
static inline int spa_debug_port_info(int indent, const struct spa_port_info *info)
{
spa_debug("%*s" "struct spa_port_info %p:", indent, "", info);
spa_debug("%*s" " flags: \t%08" PRIx64, indent, "", info->flags);

View file

@ -251,8 +251,15 @@ struct spa_param_info {
__FILE__, __LINE__, __func__, (d), (s), (size_t)(n)); \
memcpy(d,s,n); \
})
#define spa_memmove(d,s,n) \
({ \
fprintf(stderr, "%s:%u %s() memmove(%p, %p, %zd)\n", \
__FILE__, __LINE__, __func__, (d), (s), (size_t)(n)); \
memmove(d,s,n); \
})
#else
#define spa_memcpy(d,s,n) memcpy(d,s,n)
#define spa_memmove(d,s,n) memmove(d,s,n)
#endif
#ifdef __cplusplus