diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1998-03-02 16:56:18 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1998-03-02 16:56:18 (GMT) |
commit | a4f03092820d10dda2b30093e26281ee27ebbc8d (patch) | |
tree | 14c959246aae3c530841e42e6ae85f0cf4853708 /Mac/Modules/waste/wastemodule.c | |
parent | f7cfb9a7a72dfc0a2a1c68411034f4ad19b970b9 (diff) | |
download | cpython-a4f03092820d10dda2b30093e26281ee27ebbc8d.zip cpython-a4f03092820d10dda2b30093e26281ee27ebbc8d.tar.gz cpython-a4f03092820d10dda2b30093e26281ee27ebbc8d.tar.bz2 |
Added WEGetTabSize and WESetTabSize, at Just's request
Diffstat (limited to 'Mac/Modules/waste/wastemodule.c')
-rw-r--r-- | Mac/Modules/waste/wastemodule.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Mac/Modules/waste/wastemodule.c b/Mac/Modules/waste/wastemodule.c index 2da77dd..660401f 100644 --- a/Mac/Modules/waste/wastemodule.c +++ b/Mac/Modules/waste/wastemodule.c @@ -1694,6 +1694,38 @@ static PyObject *wasteObj_WEIsTabHooks(_self, _args) return _res; } +static PyObject *wasteObj_WEGetTabSize(_self, _args) + wasteObject *_self; + PyObject *_args; +{ + PyObject *_res = NULL; + SInt16 _rv; + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _rv = WEGetTabSize(_self->ob_itself); + _res = Py_BuildValue("h", + _rv); + return _res; +} + +static PyObject *wasteObj_WESetTabSize(_self, _args) + wasteObject *_self; + PyObject *_args; +{ + PyObject *_res = NULL; + OSErr _err; + SInt16 tabWidth; + if (!PyArg_ParseTuple(_args, "h", + &tabWidth)) + return NULL; + _err = WESetTabSize(tabWidth, + _self->ob_itself); + if (_err != noErr) return PyMac_Error(_err); + Py_INCREF(Py_None); + _res = Py_None; + return _res; +} + static PyMethodDef wasteObj_methods[] = { {"WEGetText", (PyCFunction)wasteObj_WEGetText, 1, "() -> (Handle _rv)"}, @@ -1839,6 +1871,10 @@ static PyMethodDef wasteObj_methods[] = { "() -> None"}, {"WEIsTabHooks", (PyCFunction)wasteObj_WEIsTabHooks, 1, "() -> (Boolean _rv)"}, + {"WEGetTabSize", (PyCFunction)wasteObj_WEGetTabSize, 1, + "() -> (SInt16 _rv)"}, + {"WESetTabSize", (PyCFunction)wasteObj_WESetTabSize, 1, + "(SInt16 tabWidth) -> None"}, {NULL, NULL, 0} }; |