From 4efa047e8dfa72ef295bb198d93e52f4eb6fb5e8 Mon Sep 17 00:00:00 2001 From: Thomas Gellekum Date: Mon, 22 Sep 2003 13:05:11 +0000 Subject: Add patch that fixes a problem with Python-2.3's Tkinter. Approved by: portmgr (will) Obtained from: sketch-0.6.16 pre-release --- graphics/skencil/files/patch-Pax::paxtkinter.c | 37 ++++++++++++++++++++++++++ graphics/sketch/files/patch-Pax::paxtkinter.c | 37 ++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 graphics/skencil/files/patch-Pax::paxtkinter.c create mode 100644 graphics/sketch/files/patch-Pax::paxtkinter.c (limited to 'graphics') diff --git a/graphics/skencil/files/patch-Pax::paxtkinter.c b/graphics/skencil/files/patch-Pax::paxtkinter.c new file mode 100644 index 000000000000..7a27ea224773 --- /dev/null +++ b/graphics/skencil/files/patch-Pax::paxtkinter.c @@ -0,0 +1,37 @@ +$FreeBSD$ + +*** /tmp/paxtkinter.c210O-r Tue Sep 16 18:14:21 2003 +--- Pax/paxtkinter.c Tue Sep 16 18:14:21 2003 +*************** +*** 1755,1760 **** +--- 1755,1774 ---- + } + #endif + ++ /* Yet another sketch specific hack: Starting with Python 2.3 Tkinter ++ * calls the wantobjects method, so we provide one that doesn't do ++ * anything. ++ */ ++ static PyObject * ++ Tkapp_WantObjects(PyObject *self, PyObject *args) ++ { ++ int wantobjects; ++ if (!PyArg_ParseTuple(args, "i:wantobjects", &wantobjects)) ++ return NULL; ++ ++ Py_INCREF(Py_None); ++ return Py_None; ++ } + + + /**** Tkapp Method List ****/ +*************** +*** 1797,1802 **** +--- 1811,1817 ---- + {"interpaddr", Tkapp_InterpAddr, 1}, + {"utf8_to_latin1", Tkapp_UTF8_to_Latin1, 1}, + {"utf8_to_system", Tkapp_UTF8_to_System, 1}, ++ {"wantobjects", Tkapp_WantObjects, METH_VARARGS}, + {NULL, NULL} + }; + diff --git a/graphics/sketch/files/patch-Pax::paxtkinter.c b/graphics/sketch/files/patch-Pax::paxtkinter.c new file mode 100644 index 000000000000..7a27ea224773 --- /dev/null +++ b/graphics/sketch/files/patch-Pax::paxtkinter.c @@ -0,0 +1,37 @@ +$FreeBSD$ + +*** /tmp/paxtkinter.c210O-r Tue Sep 16 18:14:21 2003 +--- Pax/paxtkinter.c Tue Sep 16 18:14:21 2003 +*************** +*** 1755,1760 **** +--- 1755,1774 ---- + } + #endif + ++ /* Yet another sketch specific hack: Starting with Python 2.3 Tkinter ++ * calls the wantobjects method, so we provide one that doesn't do ++ * anything. ++ */ ++ static PyObject * ++ Tkapp_WantObjects(PyObject *self, PyObject *args) ++ { ++ int wantobjects; ++ if (!PyArg_ParseTuple(args, "i:wantobjects", &wantobjects)) ++ return NULL; ++ ++ Py_INCREF(Py_None); ++ return Py_None; ++ } + + + /**** Tkapp Method List ****/ +*************** +*** 1797,1802 **** +--- 1811,1817 ---- + {"interpaddr", Tkapp_InterpAddr, 1}, + {"utf8_to_latin1", Tkapp_UTF8_to_Latin1, 1}, + {"utf8_to_system", Tkapp_UTF8_to_System, 1}, ++ {"wantobjects", Tkapp_WantObjects, METH_VARARGS}, + {NULL, NULL} + }; + -- cgit v1.2.3