mirror of
git://repo.or.cz/tinycc.git
synced 2026-06-21 12:24:18 +08:00
bt-dll.c: use REDIR_PTR_INDIR macro for __bound_ptr_add
__bound_ptr_add was implemented manually while adjacent __bound_ptr_indir* functions used the REDIR_PTR_INDIR macro. This consolidates the pattern for consistency.
This commit is contained in:
parent
9f5cc97690
commit
1153e48335
@ -76,16 +76,11 @@ REDIR_WRAP(void, __bt_exit, (rt_context *p),
|
||||
REDIR_WRAP(int, __bt_backtrace, (rt_frame *f, const char *msg),
|
||||
(rt_frame *, const char *), (f, msg))
|
||||
|
||||
void * __bound_ptr_add(void *p, size_t offset)
|
||||
{
|
||||
typedef void *(*fn_t)(void *, size_t);
|
||||
return ((fn_t)all_ptrs.__bound_ptr_add)(p, offset);
|
||||
}
|
||||
|
||||
#define REDIR_PTR_INDIR(name) \
|
||||
REDIR_WRAP(void *, name, (void *p, size_t offset), \
|
||||
(void *, size_t), (p, offset))
|
||||
|
||||
REDIR_PTR_INDIR(__bound_ptr_add)
|
||||
REDIR_PTR_INDIR(__bound_ptr_indir1)
|
||||
REDIR_PTR_INDIR(__bound_ptr_indir2)
|
||||
REDIR_PTR_INDIR(__bound_ptr_indir4)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user