diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1996-04-23 16:17:08 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1996-04-23 16:17:08 (GMT) |
commit | 8ae8e4f9635215fece5eafba5593279065291811 (patch) | |
tree | 42824e6acbebf3a0e5af37db89c67573733a4798 /Mac/Modules/waste/wastemodule.c | |
parent | efe8c9c7464479a9d8ab8ec7e01ac85b6ad374b9 (diff) | |
download | cpython-8ae8e4f9635215fece5eafba5593279065291811.zip cpython-8ae8e4f9635215fece5eafba5593279065291811.tar.gz cpython-8ae8e4f9635215fece5eafba5593279065291811.tar.bz2 |
Made style and soup handles optional
Diffstat (limited to 'Mac/Modules/waste/wastemodule.c')
-rw-r--r-- | Mac/Modules/waste/wastemodule.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/Mac/Modules/waste/wastemodule.c b/Mac/Modules/waste/wastemodule.c index 6ffdf44..fb8f620 100644 --- a/Mac/Modules/waste/wastemodule.c +++ b/Mac/Modules/waste/wastemodule.c @@ -40,9 +40,6 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *); extern PyObject *BMObj_New(BitMapPtr); extern int BMObj_Convert(PyObject *, BitMapPtr *); -extern PyObject *PMObj_New(PixMapHandle); -extern int PMObj_Convert(PyObject *, PixMapHandle *); - extern PyObject *WinObj_WhichWindow(WindowPtr); #include <WASTE.h> @@ -559,7 +556,8 @@ static PyObject *wasteObj_WEContinuousStyle(_self, _args) Boolean _rv; WEStyleMode mode; TextStyle ts; - if (!PyArg_ParseTuple(_args, "")) + if (!PyArg_ParseTuple(_args, "h", + &mode)) return NULL; _rv = WEContinuousStyle(&mode, &ts, @@ -692,9 +690,9 @@ static PyObject *wasteObj_WECopyRange(_self, _args) if (!PyArg_ParseTuple(_args, "llO&O&O&", &rangeStart, &rangeEnd, - ResObj_Convert, &hText, - ResObj_Convert, &hStyles, - ResObj_Convert, &hSoup)) + OptResObj_Convert, &hText, + OptResObj_Convert, &hStyles, + OptResObj_Convert, &hSoup)) return NULL; _err = WECopyRange(rangeStart, rangeEnd, @@ -916,8 +914,8 @@ static PyObject *wasteObj_WEInsert(_self, _args) WESoupHandle hSoup; if (!PyArg_ParseTuple(_args, "s#O&O&", &pText__in__, &pText__in_len__, - ResObj_Convert, &hStyles, - ResObj_Convert, &hSoup)) + OptResObj_Convert, &hStyles, + OptResObj_Convert, &hSoup)) return NULL; pText__len__ = pText__in_len__; _err = WEInsert(pText__in__, pText__len__, @@ -1344,7 +1342,7 @@ static PyMethodDef wasteObj_methods[] = { {"WESetViewRect", (PyCFunction)wasteObj_WESetViewRect, 1, "(LongRect viewRect) -> None"}, {"WEContinuousStyle", (PyCFunction)wasteObj_WEContinuousStyle, 1, - "() -> (Boolean _rv, WEStyleMode mode, TextStyle ts)"}, + "(WEStyleMode mode) -> (Boolean _rv, WEStyleMode mode, TextStyle ts)"}, {"WEGetRunInfo", (PyCFunction)wasteObj_WEGetRunInfo, 1, "(long offset) -> (WERunInfo runInfo)"}, {"WEGetOffset", (PyCFunction)wasteObj_WEGetOffset, 1, |