]> granicus.if.org Git - python/commitdiff
Fixed GetPen and SetPt arguments
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 8 Jan 1996 23:47:31 +0000 (23:47 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 8 Jan 1996 23:47:31 +0000 (23:47 +0000)
Mac/Modules/qd/Qdmodule.c
Mac/Modules/qd/qdgen.py
Mac/Modules/qd/qdscan.py

index 14d5a4dc5977ea2b803619e603f2c79ba25c1c98..adbba8781ee6ce335e93988a0d107117209cf721 100644 (file)
@@ -543,8 +543,7 @@ static PyObject *Qd_GetPen(_self, _args)
 {
        PyObject *_res = NULL;
        Point pt;
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetPoint, &pt))
+       if (!PyArg_ParseTuple(_args, ""))
                return NULL;
        GetPen(&pt);
        _res = Py_BuildValue("O&",
@@ -2062,8 +2061,7 @@ static PyObject *Qd_SetPt(_self, _args)
        Point pt;
        short h;
        short v;
-       if (!PyArg_ParseTuple(_args, "O&hh",
-                             PyMac_GetPoint, &pt,
+       if (!PyArg_ParseTuple(_args, "hh",
                              &h,
                              &v))
                return NULL;
@@ -3435,7 +3433,7 @@ static PyMethodDef Qd_methods[] = {
        {"ShowPen", (PyCFunction)Qd_ShowPen, 1,
         "() -> None"},
        {"GetPen", (PyCFunction)Qd_GetPen, 1,
-        "(Point pt) -> (Point pt)"},
+        "() -> (Point pt)"},
        {"GetPenState", (PyCFunction)Qd_GetPenState, 1,
         "() -> (PenState pnState)"},
        {"SetPenState", (PyCFunction)Qd_SetPenState, 1,
@@ -3597,7 +3595,7 @@ static PyMethodDef Qd_methods[] = {
        {"FillPoly", (PyCFunction)Qd_FillPoly, 1,
         "(PolyHandle poly, Pattern pat) -> None"},
        {"SetPt", (PyCFunction)Qd_SetPt, 1,
-        "(Point pt, short h, short v) -> (Point pt)"},
+        "(short h, short v) -> (Point pt)"},
        {"LocalToGlobal", (PyCFunction)Qd_LocalToGlobal, 1,
         "(Point pt) -> (Point pt)"},
        {"GlobalToLocal", (PyCFunction)Qd_GlobalToLocal, 1,
index 7ea15fe61de9bd9f35b70f3b3d3875266d834fdc..df3ad98d5b33c5677bc7a44b07eee2b263204b20 100644 (file)
@@ -88,7 +88,7 @@ f = Function(void, 'ShowPen',
 functions.append(f)
 
 f = Function(void, 'GetPen',
-    (Point, 'pt', InOutMode),
+    (Point, 'pt', OutMode),
 )
 functions.append(f)
 
@@ -570,7 +570,7 @@ f = Function(void, 'FillPoly',
 functions.append(f)
 
 f = Function(void, 'SetPt',
-    (Point, 'pt', InOutMode),
+    (Point, 'pt', OutMode),
     (short, 'h', InMode),
     (short, 'v', InMode),
 )
index 2838c069bf22e9b4b6587c69b329d84b9e7592c8..6c87ce089858c1d3847976c4d1e5867dee4296d8 100644 (file)
@@ -109,6 +109,11 @@ class MyScanner(Scanner):
                          ('short', 'byteCount', 'InMode')],
                         [('TextThingie', '*', '*'), ('*', '*', '*'), ('*', '*', '*')]),
                        
+                       # GetPen and SetPt use a point-pointer as output-only:
+                       ('GetPen', [('Point', '*', 'OutMode')], [('*', '*', 'OutMode')]),
+                       ('SetPt', [('Point', '*', 'OutMode')], [('*', '*', 'OutMode')]),
+                       
+                       # All others use it as input/output:
                        ([('Point', '*', 'OutMode')],
                         [('*', '*', 'InOutMode')]),