diff options
author | wiedi <wiedi@pkgsrc.org> | 2014-02-26 10:36:58 +0000 |
---|---|---|
committer | wiedi <wiedi@pkgsrc.org> | 2014-02-26 10:36:58 +0000 |
commit | d1815af45a9fea017e9ed2d84429a8194acbd4b5 (patch) | |
tree | c8de13ee0bad6eb4d20cad16377bdab8dab87368 /graphics | |
parent | d0f513b5cc940f40e7128f9fc016c272f49515e6 (diff) | |
download | pkgsrc-d1815af45a9fea017e9ed2d84429a8194acbd4b5.tar.gz |
Rename variables to avoid use of reserved identifiers.
Fix from upstream: https://github.com/matplotlib/matplotlib/issues/2463
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/py-matplotlib/distinfo | 4 | ||||
-rw-r--r-- | graphics/py-matplotlib/patches/patch-lib_matplotlib_tri___tri.cpp | 24 | ||||
-rw-r--r-- | graphics/py-matplotlib/patches/patch-lib_matplotlib_tri___tri.h | 15 |
3 files changed, 42 insertions, 1 deletions
diff --git a/graphics/py-matplotlib/distinfo b/graphics/py-matplotlib/distinfo index 1201b4c5505..14508abf267 100644 --- a/graphics/py-matplotlib/distinfo +++ b/graphics/py-matplotlib/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.21 2014/01/21 21:14:06 drochner Exp $ +$NetBSD: distinfo,v 1.22 2014/02/26 10:36:58 wiedi Exp $ SHA1 (matplotlib-1.3.1.tar.gz) = 8578afc86424392591c0ee03f7613ffa9b6f68ee RMD160 (matplotlib-1.3.1.tar.gz) = 7c2647ae1d6aafdc1c32e47183239c7da0d91956 Size (matplotlib-1.3.1.tar.gz) = 42163182 bytes SHA1 (patch-ab) = 416ceee9a060b98b615ef9a98ac8cab25fa9f408 +SHA1 (patch-lib_matplotlib_tri___tri.cpp) = ca21c3045eef3dae741ad2b4403f78b505e0b579 +SHA1 (patch-lib_matplotlib_tri___tri.h) = f51cf95eed8e2a490d366ce39730587c944c60f4 diff --git a/graphics/py-matplotlib/patches/patch-lib_matplotlib_tri___tri.cpp b/graphics/py-matplotlib/patches/patch-lib_matplotlib_tri___tri.cpp new file mode 100644 index 00000000000..ea33b930ea7 --- /dev/null +++ b/graphics/py-matplotlib/patches/patch-lib_matplotlib_tri___tri.cpp @@ -0,0 +1,24 @@ +$NetBSD: patch-lib_matplotlib_tri___tri.cpp,v 1.1 2014/02/26 10:36:58 wiedi Exp $ + +Rename C++ variables to avoid use of reserved identifiers +See: https://github.com/matplotlib/matplotlib/issues/2463 +--- lib/matplotlib/tri/_tri.cpp.orig 2013-10-10 12:42:48.000000000 +0000 ++++ lib/matplotlib/tri/_tri.cpp +@@ -2177,14 +2177,14 @@ TrapezoidMapTriFinder::Trapezoid::set_up + + + RandomNumberGenerator::RandomNumberGenerator(unsigned long seed) +- : _M(21870), _A(1291), _C(4621), _seed(seed % _M) ++ : _m(21870), _a(1291), _c(4621), _seed(seed % _m) + {} + + unsigned long + RandomNumberGenerator::operator()(unsigned long max_value) + { +- _seed = (_seed*_A + _C) % _M; +- return (_seed*max_value) / _M; ++ _seed = (_seed*_a + _c) % _m; ++ return (_seed*max_value) / _m; + } + + diff --git a/graphics/py-matplotlib/patches/patch-lib_matplotlib_tri___tri.h b/graphics/py-matplotlib/patches/patch-lib_matplotlib_tri___tri.h new file mode 100644 index 00000000000..f314e72c1cf --- /dev/null +++ b/graphics/py-matplotlib/patches/patch-lib_matplotlib_tri___tri.h @@ -0,0 +1,15 @@ +$NetBSD: patch-lib_matplotlib_tri___tri.h,v 1.1 2014/02/26 10:36:58 wiedi Exp $ + +Rename C++ variables to avoid use of reserved identifiers +See: https://github.com/matplotlib/matplotlib/issues/2463 +--- lib/matplotlib/tri/_tri.h.orig 2013-10-10 12:42:48.000000000 +0000 ++++ lib/matplotlib/tri/_tri.h +@@ -818,7 +818,7 @@ public: + unsigned long operator()(unsigned long max_value); + + private: +- const unsigned long _M, _A, _C; ++ const unsigned long _m, _a, _c; + unsigned long _seed; + }; + |