Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Revert "avoid mutex locks on pj_transform for proj 4.7 and above - cl…

…oses #1072"

This reverts commit 0748d2b.
  • Loading branch information...
commit 7c529600eb8f0c7bd6d389dafa22c17d90beda32 1 parent 3f26c43
@springmeyer springmeyer authored
Showing with 7 additions and 9 deletions.
  1. +2 −4 src/proj_transform.cpp
  2. +5 −5 src/projection.cpp
View
6 src/proj_transform.cpp
@@ -102,8 +102,7 @@ bool proj_transform::forward (double * x, double * y , double * z, int point_cou
}
do {
-// https://github.com/mapnik/mapnik/issues/1072
-#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 470
+#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 480
mutex::scoped_lock lock(projection::mutex_);
#endif
if (pj_transform( source_.proj_, dest_.proj_, point_count,
@@ -154,8 +153,7 @@ bool proj_transform::backward (double * x, double * y , double * z, int point_co
}
do {
-// https://github.com/mapnik/mapnik/issues/1072
-#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 470
+#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 480
mutex::scoped_lock lock(projection::mutex_);
#endif
View
10 src/projection.cpp
@@ -34,7 +34,7 @@
namespace mapnik {
-#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 470
+#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 480
boost::mutex projection::mutex_;
#endif
@@ -84,7 +84,7 @@ std::string const& projection::params() const
void projection::forward(double & x, double &y ) const
{
-#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 470
+#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 480
mutex::scoped_lock lock(mutex_);
#endif
projUV p;
@@ -102,7 +102,7 @@ void projection::forward(double & x, double &y ) const
void projection::inverse(double & x,double & y) const
{
-#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 470
+#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 480
mutex::scoped_lock lock(mutex_);
#endif
if (is_geographic_)
@@ -120,7 +120,7 @@ void projection::inverse(double & x,double & y) const
projection::~projection()
{
-#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 470
+#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 480
mutex::scoped_lock lock(mutex_);
#endif
if (proj_) pj_free(proj_);
@@ -131,7 +131,7 @@ projection::~projection()
void projection::init()
{
-#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 470
+#if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 480
mutex::scoped_lock lock(mutex_);
#endif
#if PJ_VERSION >= 480
Please sign in to comment.
Something went wrong with that request. Please try again.