lib/sod.h: New macro `SOD_INSTBASE' to find the allocated base address.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 15 Aug 2015 15:14:32 +0000 (16:14 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 15 Aug 2015 15:14:32 +0000 (16:14 +0100)
commit45c534845b49ab429532df59efde578e7b959bdb
tree2676524b34e3d1aff45d854ccf7cddb7faee3536
parent9ec578d9fe450b7e7f9030dc9d930185593aa991
lib/sod.h: New macro `SOD_INSTBASE' to find the allocated base address.

This turns out to be useful, e.g., for freeing dynamically allocated
objects.  A destructor method might usefully say something like

free(SOD_INSTBASE(me));

after actually releasing any other resources.
lib/sod.h