[1.1.X] No longer use the deprecated GEOS C API function `GEOSGeomFromWKB_buf` when unpickling `GEOSGeometry` objects.
Backport of r12898 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12899 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
7a7b9a0428
commit
fa114305cb
|
@ -142,7 +142,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)
|
||||
|
|
Loading…
Reference in New Issue