#include <stddef.h>
#include <stdio.h>
|
#define | container_of(p, t, m) ((t*)((char*)(p) - offsetof(t, m))) |
|
#define | vptr_shared(b, d) |
|
#define | call(t, vf, p) (((p)->t.vptr->vf)((p))) |
|
#define | vcall(vf, p) (((p)->vptr->vf)((p))) |
|
#define | X(n, t, m) void n(t *p) { printf("%-5s %s\n", __func__, p->m data); } |
|
◆ call
#define call |
( |
| t, |
|
|
| vf, |
|
|
| p ) (((p)->t.vptr->vf)((p))) |
◆ container_of
#define container_of |
( |
| p, |
|
|
| t, |
|
|
| m ) ((t*)((char*)(p) - offsetof(t, m))) |
◆ vcall
#define vcall |
( |
| vf, |
|
|
| p ) (((p)->vptr->vf)((p))) |
◆ 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 * | | ) |
|
◆ d_pre_af1()
void d_pre_af1 |
( |
struct d * | p | ) |
|
◆ d_pre_bf1()
void d_pre_bf1 |
( |
struct d * | p | ) |
|
◆ d_pre_cf1()
void d_pre_cf1 |
( |
struct d * | p | ) |
|
◆ df()
◆ main()
◆ a_vtbl
◆ b_vtbl
◆ c_vtbl
◆ d_vtbl
const struct d_vtbl d_vtbl |
Initial value:= {
}
void d_pre_af1(struct d *p)
Definition mult_opt.c:32
◆ db_vtbl
◆ dc_vtbl