Use global ctypes type memo to avoid generating the same type twice (and them not being equal)