summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1996-09-30 14:43:22 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1996-09-30 14:43:22 (GMT)
commiteb76b8484dfd9307e4bbd6d6c3ad87cc6090adca (patch)
treee9e39489446544c61ea90b0ec6e82746ab24f472 /Mac
parent05cf7e040b79be2edef7c08e447edc6426db8530 (diff)
downloadcpython-eb76b8484dfd9307e4bbd6d6c3ad87cc6090adca.zip
cpython-eb76b8484dfd9307e4bbd6d6c3ad87cc6090adca.tar.gz
cpython-eb76b8484dfd9307e4bbd6d6c3ad87cc6090adca.tar.bz2
Added DebugStr method to drop into low-level debugger
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Modules/macosmodule.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/Mac/Modules/macosmodule.c b/Mac/Modules/macosmodule.c
index 26e2701..cda079a 100644
--- a/Mac/Modules/macosmodule.c
+++ b/Mac/Modules/macosmodule.c
@@ -29,6 +29,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <Windows.h>
#include <Files.h>
+#include <LowMem.h>
static PyObject *MacOS_Error; /* Exception MacOS.Error */
@@ -532,6 +533,20 @@ MacOS_splash(PyObject *self, PyObject *args)
return Py_None;
}
+static char DebugStr_doc[] = "Switch to low-level debugger with a message";
+
+static PyObject *
+MacOS_DebugStr(PyObject *self, PyObject *args)
+{
+ Str255 message;
+ PyObject *object = 0;
+
+ if (!PyArg_ParseTuple(args, "O&|O", PyMac_GetStr255, message, &object))
+ return NULL;
+ DebugStr(message);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
static char openrf_doc[] = "Open resource fork of a file";
@@ -606,6 +621,7 @@ static PyMethodDef MacOS_Methods[] = {
{"GetErrorString", MacOS_GetErrorString, 1},
{"openrf", MacOS_openrf, 1, openrf_doc},
{"splash", MacOS_splash, 1, splash_doc},
+ {"DebugStr", MacOS_DebugStr, 1, DebugStr_doc},
{NULL, NULL} /* Sentinel */
};