MCPcopy Create free account
hub / github.com/DFHack/dfhack / set_vmethod_ptr

Method set_vmethod_ptr

library/VTableInterpose.cpp:219–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219bool virtual_identity::set_vmethod_ptr(MemoryPatcher &patcher, int idx, void *ptr) const
220{
221 assert(idx >= 0);
222 void **vtable = (void**)vtable_ptr();
223 if (!vtable) return NULL;
224 return patcher.write(&vtable[idx], &ptr, sizeof(void*));
225}
226
227/*
228 VMethod interposing data structures.

Callers 3

on_host_deleteMethod · 0.80
applyMethod · 0.80
removeMethod · 0.80

Calls 2

vtable_ptrFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected