mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-15 07:00:05 -05:00
utils: add debugable spa_memcpy
This commit is contained in:
parent
c2cb74a146
commit
74cf412f47
5 changed files with 25 additions and 14 deletions
|
|
@ -239,6 +239,17 @@ struct spa_param_info {
|
|||
strerror(_err); \
|
||||
})
|
||||
|
||||
#ifdef SPA_DEBUG_MEMCPY
|
||||
#define spa_memcpy(d,s,n) \
|
||||
({ \
|
||||
fprintf(stderr, "%s:%u %s() memcpy(%p, %p, %zd)\n", \
|
||||
__FILE__, __LINE__, __func__, (d), (s), (size_t)(n)); \
|
||||
memcpy(d,s,n); \
|
||||
})
|
||||
#else
|
||||
#define spa_memcpy(d,s,n) memcpy(d,s,n)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue