diff options
| author | Justin Bronn <jbronn@gmail.com> | 2010-03-31 18:55:52 +0000 |
|---|---|---|
| committer | Justin Bronn <jbronn@gmail.com> | 2010-03-31 18:55:52 +0000 |
| commit | 2fa2cf0a092816bfd92ff5e94907f5bca8f3c365 (patch) | |
| tree | 3dd318e600017971154fc4b8686d0f5fb5918293 | |
| parent | 4e5c20b78b17df25948809ca1c880551351d4d83 (diff) | |
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
| -rw-r--r-- | django/contrib/gis/geos/geometry.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/gis/geos/geometry.py b/django/contrib/gis/geos/geometry.py index c508431c2a..51666bc4d4 100644 --- a/django/contrib/gis/geos/geometry.py +++ b/django/contrib/gis/geos/geometry.py @@ -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) |
