0
0
mirror of https://github.com/django/django.git synced 2024-12-01 07:31:48 +01:00

No longer use the deprecated GEOS C API function GEOSGeomFromWKB_buf when unpickling GEOSGeometry objects.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Justin Bronn 2010-03-31 18:55:52 +00:00
parent 4e5c20b78b
commit 2fa2cf0a09

View File

@ -143,7 +143,7 @@ class GEOSGeometry(GEOSBase, ListMixin):
def __setstate__(self, state):
# Instantiating from the tuple state that was pickled.
wkb, srid = state
ptr = capi.from_wkb(wkb, len(wkb))
ptr = wkb_r().read(buffer(wkb))
if not ptr: raise GEOSException('Invalid Geometry loaded from pickled state.')
self.ptr = ptr
self._post_init(srid)