#include <stddef.h>
#include <stdio.h>
|
#define | vptr_shared(b, d) |
|
#define | offset_from_base(d, b) (-(ptrdiff_t)offsetof(d, b)) |
|
#define | call(t, vf, p) call_impl((p)->t.vptr->vf, (p)) |
|
#define | vcall(vf, p) call_impl((p)->vptr->vf, (p)) |
|
#define | call_impl(vf, p) (((vf).f)(voff(&(vf), (p)))) |
|
#define | X(n, t, m) void n(t *p) { printf("%-5s %s\n", __func__, p->m data); } |
|
◆ call
◆ call_impl
#define call_impl |
( |
| vf, |
|
|
| p ) (((vf).f)(voff(&(vf), (p)))) |
◆ offset_from_base
#define offset_from_base |
( |
| d, |
|
|
| b ) (-(ptrdiff_t)offsetof(d, b)) |
◆ vcall
◆ vptr_shared
#define vptr_shared |
( |
| b, |
|
|
| d ) |
Value: union { \
const struct d ## _vtbl *vptr; \
}
#define X |
( |
| n, |
|
|
| t, |
|
|
| m ) void n(t *p) { printf("%-5s %s\n", __func__, p->m data); } |
◆ af0()
◆ af1()
◆ bf0()
◆ bf1()
◆ cf0()
◆ cf1()
◆ d_af1()
void d_af1 |
( |
struct d * | | ) |
|
◆ d_bf1()
void d_bf1 |
( |
struct d * | | ) |
|
◆ d_cf1()
void d_cf1 |
( |
struct d * | | ) |
|
◆ df()
◆ main()
◆ voff()
void * voff |
( |
const struct vfn * | v, |
|
|
void * | p ) |
◆ a_vtbl
◆ b_vtbl
◆ c_vtbl
◆ d_vtbl
const struct d_vtbl d_vtbl |
◆ db_vtbl
Initial value:= {
}
#define offset_from_base(d, b)
Definition mult_inh.c:9
◆ dc_vtbl