1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
|
Description: Adjust code for building agaisnt SWIG 4.3
Author: Jitka Plesnikova <jplesnik@redhat.com>
Origin: other, https://src.fedoraproject.org/rpms/plplot/blob/rawhide/f/plplot-5.15.0-swig-4.3.patch
Bug-Debian: https://bugs.debian.org/1091121
Forwarded: not-needed
Reviewed-By: Rafael Laboissière <rafael@debian.org>
Last-Update: 2025-01-11
--- plplot-5.15.0+dfsg2.orig/bindings/java/plplotjavac.i
+++ plplot-5.15.0+dfsg2/bindings/java/plplotjavac.i
@@ -2128,9 +2128,9 @@ PLBOOL_OUTPUT_TYPEMAP( PLBOOL, jboolean,
%typemap( argout ) PLGraphicsIn * gin {
PyObject *o;
o = PyFloat_FromDouble( $1->wX );
- resultobj = t_output_helper( resultobj, o );
+ resultobj = SWIG_AppendOutput( resultobj, o );
o = PyFloat_FromDouble( $1->wY );
- resultobj = t_output_helper( resultobj, o );
+ resultobj = SWIG_AppendOutput( resultobj, o );
}
#endif
--- plplot-5.15.0+dfsg2.orig/bindings/octave/plplot_octave.i
+++ plplot-5.15.0+dfsg2/bindings/octave/plplot_octave.i
@@ -770,7 +770,7 @@ typedef PLINT PLBOOL;
}
%typemap ( argout ) ( const PLFLT * ArrayY, PLINT ny, PLFLT * OutMatrixCk )
{
- $result = SWIG_Octave_AppendOutput( $result, retval$argnum( 0 ) );
+ $result = SWIG_AppendOutput( $result, retval$argnum( 0 ) );
}
%typemap ( freearg ) ( const PLFLT * ArrayY, PLINT ny, PLFLT * OutMatrixCk )
{
@@ -796,7 +796,7 @@ typedef PLINT PLBOOL;
local_charMatrix = charMatrix( 1, local_string_length );
local_charMatrix.insert( local_string$argnum, 0, 0 );
retval( 0 ) = octave_value( local_charMatrix );
- $result = SWIG_Octave_AppendOutput( $result, retval( 0 ) );
+ $result = SWIG_AppendOutput( $result, retval( 0 ) );
}
typedef PLINT ( *defined_func )( PLFLT, PLFLT );
--- plplot-5.15.0+dfsg2.orig/bindings/python/fragments.i
+++ plplot-5.15.0+dfsg2/bindings/python/fragments.i
@@ -1,29 +1,2 @@
/* Helper function to return tuples */
-
-%fragment("t_output_helper","header") %{
- static PyObject* t_output_helper(PyObject* target, PyObject* o) {
- PyObject* o2;
- PyObject* o3;
-
- if (!target) {
- target = o;
- } else if (target == Py_None) {
- Py_DECREF(Py_None);
- target = o;
- } else {
- if (!PyTuple_Check(target)) {
- o2 = target;
- target = PyTuple_New(1);
- PyTuple_SetItem(target, 0, o2);
- }
- o3 = PyTuple_New(1);
- PyTuple_SetItem(o3, 0, o);
-
- o2 = target;
- target = PySequence_Concat(o2, o3);
- Py_DECREF(o2);
- Py_DECREF(o3);
- }
- return target;
-}
-%}
+/* Legacy - file can be deleted */
--- plplot-5.15.0+dfsg2.orig/bindings/python/plplotc.i
+++ plplot-5.15.0+dfsg2/bindings/python/plplotc.i
@@ -682,7 +682,7 @@ typedef PLINT PLBOOL;
}
%typemap ( argout ) ( const PLFLT * ArrayY, PLINT ny, PLFLT **OutMatrixCk )
{
- $result = SWIG_Python_AppendOutput( $result, array$argnum );
+ $result = SWIG_AppendOutput( $result, array$argnum );
}
//**************************
@@ -749,9 +749,9 @@ typedef PLINT PLBOOL;
{
$1 = buff;
}
-%typemap( argout, fragment = "t_output_helper" ) char *OUTPUT {
+%typemap( argout ) char *OUTPUT {
PyObject *o = PyString_FromString( $1 );
- $result = t_output_helper( $result, o );
+ $result = SWIG_AppendOutput( $result, o );
}
//**************************
@@ -1662,9 +1662,9 @@ typedef void ( *label_func )( PLINT, PLF
%typemap( argout ) PLGraphicsIn * gin {
PyObject *o;
o = PyFloat_FromDouble( $1->wX );
- resultobj = t_output_helper( resultobj, o );
+ resultobj = SWIG_AppendOutput( resultobj, o );
o = PyFloat_FromDouble( $1->wY );
- resultobj = t_output_helper( resultobj, o );
+ resultobj = SWIG_AppendOutput( resultobj, o );
}
#endif
|