>>949
C++なんだから、こっちで多重定義してしまえばいい。
inline foo_data_get(foo*& data)
{
void *p;
data_get(&p);
data = static_cast<foo*>(p);
}