OP2/PyOP2 — pull request #87 by wence- (2012-10-15 15:59:02+00:00)
Title: Make plan wrapper safe against reallocation of OP_plans array

op_plan_core returns a pointer into the OP_plans array, this is
realloc'd when we create more plans than OP_plan_max. This
potentially invalidates pointers returned from op_plan_core that we
were holding on to as a handle in our core op_plan wrapper.

To fix this, remember the index corresponding to this plan (rather
than holding on to the pointer) and use that to grab a pointer to the
plan when necessary.