diff callbacks: marshal through IntPtrs