Picking matplotlib figures

I've been looking at how to pickle figures: it looks like is should be
a simple modification to make all _transform objects (Value,
Point, Bbox, Affine etc.) picklable. This should be possible without
modifying any cpp code.

I hit a problem though. The following code generates a seg-fault:

from matplotlib._transforms import *
from types import *
V=Value(0)
issubclass(type(V), TypeType)

Segmentation fault

The 'issubclass' function is called by the default pickler. The seg-fault
seems to occur for any of the matplotlib._transform CXX-types.

I can't reproduce the bug with any other python C-entensions
(SWIG-generated wrappers work differently, so the problem doesn't occur).
Both Numeric array and VTK objects work fine with 'issubclass'.

Could this be a problem with CXX? It may be a python bug of course, but it
will be quicker to fix matplotlib than wait for the next python release.

Ideas?

Bryan