File: swig-py3.patch

package info (click to toggle)
xdmf 3.0%2Bgit20190531-14
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,796 kB
  • sloc: cpp: 67,089; ansic: 5,172; python: 4,566; f90: 1,247; java: 187; fortran: 173; makefile: 92; sh: 28
file content (13 lines) | stat: -rw-r--r-- 564 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
Index: xdmf-3.0+git20190531/core/XdmfCore.i
===================================================================
--- xdmf-3.0+git20190531.orig/core/XdmfCore.i
+++ xdmf-3.0+git20190531/core/XdmfCore.i
@@ -598,7 +598,7 @@ swig -v -c++ -python -o XdmfCorePython.c
         void *vp = $self->getValuesInternal();
         Py_ssize_t sz =
             $self->getSize() * $self->getArrayType()->getElementSize();
-        PyObject * c = PyBuffer_FromMemory(vp, sz);
+        PyObject * c = PyMemoryView_FromMemory((char*)vp, sz, PyBUF_READ);
         return(c);
     }