[Solved] Interpose C struct function pointer
If I understand correctly, you want all calls to sub (or rather _Z3subP7AStructii) to actually be calling your _sub function instead? The problem is that when the “client” calls some_astruct->sub(…) it doesn’t actually call _Z3subP7AStructii directly, and therefore your _sub function won’t be called. In other words, the “client” doesn’t have a call to _Z3subP7AStructii, … Read more