cpSpaceAddPostStepCallback在3.0RC1中怎样使用?

想在碰撞后把一个shape删除,在onContactSeperate中处理会引起下面运行时错误:
Aborting due to Chipmunk error: This operation cannot be done safely during a call to cpSpaceStep() or during a query. Put these calls into a post-step callback.
Failed condition: !space->locked

所以想用旧的方式cpSpaceAddPostStepCallback来处理,但没找到cpSpace在哪可以获得。