Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

No longer use the deprecated GEOS C API function `GEOSGeomFromWKB_buf…

…` when unpickling `GEOSGeometry` objects.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 2fa2cf0a092816bfd92ff5e94907f5bca8f3c365 1 parent 4e5c20b
@jbronn jbronn authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/contrib/gis/geos/
2  django/contrib/gis/geos/
@@ -143,7 +143,7 @@ def __getstate__(self):
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
Please sign in to comment.
Something went wrong with that request. Please try again.