summaryrefslogtreecommitdiff
path: root/databases/metakit-lib/patches
diff options
context:
space:
mode:
authorjoerg <joerg>2012-11-16 00:40:44 +0000
committerjoerg <joerg>2012-11-16 00:40:44 +0000
commit21a08cb7c08477ec4e8b3e207c5ec2d796d6e088 (patch)
treeec1f87c7f1d103874e21f859f7a03e3d6f27a47f /databases/metakit-lib/patches
parente1ab1873dd6b78b96d4112a2d755b31ae5d429d2 (diff)
downloadpkgsrc-21a08cb7c08477ec4e8b3e207c5ec2d796d6e088.tar.gz
Don't redefine a local variable.
Diffstat (limited to 'databases/metakit-lib/patches')
-rw-r--r--databases/metakit-lib/patches/patch-python_PyView.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/databases/metakit-lib/patches/patch-python_PyView.cpp b/databases/metakit-lib/patches/patch-python_PyView.cpp
new file mode 100644
index 00000000000..dde9bda6c39
--- /dev/null
+++ b/databases/metakit-lib/patches/patch-python_PyView.cpp
@@ -0,0 +1,31 @@
+$NetBSD: patch-python_PyView.cpp,v 1.1 2012/11/16 00:40:44 joerg Exp $
+
+--- python/PyView.cpp.orig 2012-11-15 14:50:12.000000000 +0000
++++ python/PyView.cpp
+@@ -631,19 +631,19 @@ static PyObject *PyView_access(PyView *o
+ }
+
+ PyObject *buffer = PyString_FromStringAndSize(0, length);
+- int o = 0;
++ int o2 = 0;
+
+- while (o < length) {
+- c4_Bytes buf = prop(row).Access(offset + o, length - o);
++ while (o2 < length) {
++ c4_Bytes buf = prop(row).Access(offset + o2, length - o2);
+ int n = buf.Size();
+ if (n == 0)
+ break;
+- memcpy(PyString_AS_STRING(buffer) + o, buf.Contents(), n);
+- o += n;
++ memcpy(PyString_AS_STRING(buffer) + o2, buf.Contents(), n);
++ o2 += n;
+ }
+
+- if (o < length)
+- _PyString_Resize(&buffer, o);
++ if (o2 < length)
++ _PyString_Resize(&buffer, o2);
+
+ return buffer;
+ } catch (...) {