summaryrefslogtreecommitdiff
path: root/Mac/Modules/qt
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2000-03-03 17:06:13 +0000
committerJack Jansen <jack.jansen@cwi.nl>2000-03-03 17:06:13 +0000
commit1b7a70fa52a56d016b8b2f3699a407bb356a9c59 (patch)
tree1f432329730609b8faf907bcf7f89b46b2d32fdc /Mac/Modules/qt
parent6dc8ce9108a051ccf3337e11d5dfdcc011c325e9 (diff)
downloadcpython-git-1b7a70fa52a56d016b8b2f3699a407bb356a9c59.tar.gz
Fixed parameters to a few time and timebase calls: InOut parameters were
inadvertantly seen as out-only.
Diffstat (limited to 'Mac/Modules/qt')
-rw-r--r--Mac/Modules/qt/Qtmodule.c29
-rw-r--r--Mac/Modules/qt/qtscan.py8
2 files changed, 25 insertions, 12 deletions
diff --git a/Mac/Modules/qt/Qtmodule.c b/Mac/Modules/qt/Qtmodule.c
index a1dc7642c7..36c3efa88c 100644
--- a/Mac/Modules/qt/Qtmodule.c
+++ b/Mac/Modules/qt/Qtmodule.c
@@ -1382,12 +1382,13 @@ static PyObject *TimeBaseObj_SetTimeBaseZero(_self, _args)
{
PyObject *_res = NULL;
TimeRecord zero;
- if (!PyArg_ParseTuple(_args, ""))
+ if (!PyArg_ParseTuple(_args, "O&",
+ QtTimeRecord_Convert, &zero))
return NULL;
SetTimeBaseZero(_self->ob_itself,
&zero);
- _res = Py_BuildValue("O&",
- QtTimeRecord_New, &zero);
+ Py_INCREF(Py_None);
+ _res = Py_None;
return _res;
}
@@ -1441,7 +1442,7 @@ static PyMethodDef TimeBaseObj_methods[] = {
{"GetTimeBaseStatus", (PyCFunction)TimeBaseObj_GetTimeBaseStatus, 1,
"() -> (long _rv, TimeRecord unpinnedTime)"},
{"SetTimeBaseZero", (PyCFunction)TimeBaseObj_SetTimeBaseZero, 1,
- "() -> (TimeRecord zero)"},
+ "(TimeRecord zero) -> None"},
{"GetTimeBaseEffectiveRate", (PyCFunction)TimeBaseObj_GetTimeBaseEffectiveRate, 1,
"() -> (Fixed _rv)"},
{NULL, NULL, 0}
@@ -7633,7 +7634,8 @@ static PyObject *Qt_ConvertTime(_self, _args)
PyObject *_res = NULL;
TimeRecord inout;
TimeBase newBase;
- if (!PyArg_ParseTuple(_args, "O&",
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ QtTimeRecord_Convert, &inout,
TimeBaseObj_Convert, &newBase))
return NULL;
ConvertTime(&inout,
@@ -7650,7 +7652,8 @@ static PyObject *Qt_ConvertTimeScale(_self, _args)
PyObject *_res = NULL;
TimeRecord inout;
TimeScale newScale;
- if (!PyArg_ParseTuple(_args, "l",
+ if (!PyArg_ParseTuple(_args, "O&l",
+ QtTimeRecord_Convert, &inout,
&newScale))
return NULL;
ConvertTimeScale(&inout,
@@ -7667,7 +7670,8 @@ static PyObject *Qt_AddTime(_self, _args)
PyObject *_res = NULL;
TimeRecord dst;
TimeRecord src;
- if (!PyArg_ParseTuple(_args, "O&",
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ QtTimeRecord_Convert, &dst,
QtTimeRecord_Convert, &src))
return NULL;
AddTime(&dst,
@@ -7684,7 +7688,8 @@ static PyObject *Qt_SubtractTime(_self, _args)
PyObject *_res = NULL;
TimeRecord dst;
TimeRecord src;
- if (!PyArg_ParseTuple(_args, "O&",
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ QtTimeRecord_Convert, &dst,
QtTimeRecord_Convert, &src))
return NULL;
SubtractTime(&dst,
@@ -7903,13 +7908,13 @@ static PyMethodDef Qt_methods[] = {
{"NewTimeBase", (PyCFunction)Qt_NewTimeBase, 1,
"() -> (TimeBase _rv)"},
{"ConvertTime", (PyCFunction)Qt_ConvertTime, 1,
- "(TimeBase newBase) -> (TimeRecord inout)"},
+ "(TimeRecord inout, TimeBase newBase) -> (TimeRecord inout)"},
{"ConvertTimeScale", (PyCFunction)Qt_ConvertTimeScale, 1,
- "(TimeScale newScale) -> (TimeRecord inout)"},
+ "(TimeRecord inout, TimeScale newScale) -> (TimeRecord inout)"},
{"AddTime", (PyCFunction)Qt_AddTime, 1,
- "(TimeRecord src) -> (TimeRecord dst)"},
+ "(TimeRecord dst, TimeRecord src) -> (TimeRecord dst)"},
{"SubtractTime", (PyCFunction)Qt_SubtractTime, 1,
- "(TimeRecord src) -> (TimeRecord dst)"},
+ "(TimeRecord dst, TimeRecord src) -> (TimeRecord dst)"},
{"MusicMediaGetIndexedTunePlayer", (PyCFunction)Qt_MusicMediaGetIndexedTunePlayer, 1,
"(ComponentInstance ti, long sampleDescIndex) -> (ComponentResult _rv, ComponentInstance tp)"},
{"AlignWindow", (PyCFunction)Qt_AlignWindow, 1,
diff --git a/Mac/Modules/qt/qtscan.py b/Mac/Modules/qt/qtscan.py
index ce79380e00..5f351950e2 100644
--- a/Mac/Modules/qt/qtscan.py
+++ b/Mac/Modules/qt/qtscan.py
@@ -110,6 +110,14 @@ class MyScanner(Scanner):
# MCDoAction and more
([('void', '*', 'OutMode')], [('mcactionparams', '*', 'InMode')]),
+ # SetTimeBaseZero. Does not handle NULLs, unfortunately
+ ([('TimeRecord', 'zero', 'OutMode')], [('TimeRecord', 'zero', 'InMode')]),
+
+ # ConvertTime and ConvertTimeScale
+ ([('TimeRecord', 'inout', 'OutMode')], [('TimeRecord', 'inout', 'InOutMode')]),
+
+ # AddTime and SubtractTime
+ ([('TimeRecord', 'dst', 'OutMode')], [('TimeRecord', 'dst', 'InOutMode')]),
]
if __name__ == "__main__":