Rename variables to avoid use of reserved identifiers.

Fix from upstream: https://github.com/matplotlib/matplotlib/issues/2463
This commit is contained in:
wiedi 2014-02-26 10:36:58 +00:00
parent b77d00c6bd
commit 7d5114f8c1
3 changed files with 42 additions and 1 deletions

View file

@ -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

View file

@ -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;
}

View file

@ -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;
};