diff options
| author | Justin Bronn <jbronn@gmail.com> | 2010-03-31 18:58:19 +0000 |
|---|---|---|
| committer | Justin Bronn <jbronn@gmail.com> | 2010-03-31 18:58:19 +0000 |
| commit | fa114305cbf030818e1b056a7752d6bddb2e7c70 (patch) | |
| tree | fa8f6a6a967f8f554b515b945faf937e4cda9452 | |
| parent | 7a7b9a042873a471b2ffe0518747dd64d25c634e (diff) | |
[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
| -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 866a852d49..c1e3c66dde 100644 --- a/django/contrib/gis/geos/geometry.py +++ b/django/contrib/gis/geos/geometry.py @@ -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) |
