]> granicus.if.org Git - python/commitdiff
Added a rewrite rule so the Str255 argument of GetControlTitle is seen as
authorJack Jansen <jack.jansen@cwi.nl>
Sun, 7 Mar 1999 20:05:20 +0000 (20:05 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Sun, 7 Mar 1999 20:05:20 +0000 (20:05 +0000)
output parameter.

Mac/Modules/ctl/Ctlmodule.c
Mac/Modules/ctl/ctlscan.py

index 07fff2990411351c641b99b6b4b51eecda5e97df..42a82d9ac8c006b6eac7c84a1a21223fe0ac96a4 100644 (file)
@@ -462,13 +462,12 @@ static PyObject *CtlObj_GetControlTitle(_self, _args)
 {
        PyObject *_res = NULL;
        Str255 title;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetStr255, title))
+       if (!PyArg_ParseTuple(_args, ""))
                return NULL;
        GetControlTitle(_self->ob_itself,
                        title);
-       Py_INCREF(Py_None);
-       _res = Py_None;
+       _res = Py_BuildValue("O&",
+                            PyMac_BuildStr255, title);
        return _res;
 }
 
@@ -952,7 +951,7 @@ static PyMethodDef CtlObj_methods[] = {
        {"SetControlTitle", (PyCFunction)CtlObj_SetControlTitle, 1,
         "(Str255 title) -> None"},
        {"GetControlTitle", (PyCFunction)CtlObj_GetControlTitle, 1,
-        "(Str255 title) -> None"},
+        "() -> (Str255 title)"},
        {"GetControlValue", (PyCFunction)CtlObj_GetControlValue, 1,
         "() -> (SInt16 _rv)"},
        {"SetControlValue", (PyCFunction)CtlObj_SetControlValue, 1,
index 66b4f569d9849efc42019417b7e31b0efe82491d..aba07c5e18b90aa2f7e4e2ce463a3d0b4d13af94 100644 (file)
@@ -83,6 +83,10 @@ class MyScanner(Scanner):
 ##                     ([("ControlActionUPP", "actionProc", "InMode")],
 ##                      [("FakeType('(ControlActionUPP)0')", "*", "*")]),
                        
+                       # For GetControlTitle
+                       ([('Str255', 'title', 'InMode')],
+                        [('Str255', 'title', 'OutMode')]),
+                        
                        ([("ControlHandle", "*", "OutMode")],
                         [("ExistingControlHandle", "*", "*")]),
                        ([("ControlRef", "*", "OutMode")],      # Ditto, for Universal Headers