box/unbox hooks in C API

should help us pass C++ objects as args