]> granicus.if.org Git - python/commitdiff
New versions from Just.
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 27 Apr 1998 15:08:39 +0000 (15:08 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 27 Apr 1998 15:08:39 +0000 (15:08 +0000)
Mac/Modules/ColorPickermodule.c
Mac/Modules/Printingmodule.c

index 5101d25f639b7a3b94c436e9cdd2709d88125949..d9370b593acb89965709e9a4276e8ae4c56a3050 100644 (file)
@@ -23,7 +23,7 @@ PERFORMANCE OF THIS SOFTWARE.
 
 #include <ColorPicker.h>
 #include "Python.h"
-
+#include "macglue.h"
 
 /* ----------------------------------------------------- */
 
@@ -42,16 +42,12 @@ cp_GetColor(self, args)
        RGBColor inColor, outColor;
        Boolean ok;
        Point where = {0, 0};
-       char * prompt;
-       Str255 pprompt;
+       Str255 prompt;
        
-       if (!PyArg_ParseTuple(args, "sO&", &prompt, QdRGB_Convert, &inColor))
+       if (!PyArg_ParseTuple(args, "O&O&", PyMac_GetStr255, prompt, QdRGB_Convert, &inColor))
                return NULL;
        
-       BlockMove(prompt, pprompt + 1, strlen(prompt));
-       pprompt[0] = strlen(prompt);
-       
-       ok = GetColor(where, pprompt, &inColor, &outColor);
+       ok = GetColor(where, prompt, &inColor, &outColor);
        
        return Py_BuildValue("O&h", QdRGB_New, &outColor, ok);
 }
index e4cac9b693e4f76f978969fdac5dfa3995689b2c..94d05a6b2fe8337c329d7a960271f7c438dfa642 100644 (file)
@@ -435,7 +435,7 @@ static struct PyMethodDef Pr_methods[] = {
        {"PrOpenPage",  (PyCFunction)Pr_PrOpenPage,             METH_VARARGS,   Pr_PrOpenPage__doc__},
        {"PrClosePage", (PyCFunction)Pr_PrClosePage,    METH_VARARGS,   Pr_PrClosePage__doc__},
        {"PrPicFile",   (PyCFunction)Pr_PrPicFile,              METH_VARARGS,   Pr_PrPicFile__doc__},
-       {"PrGeneral",   (PyCFunction)Pr_PrGeneral,              METH_VARARGS,   Pr_PrGeneral__doc__},
+//     {"PrGeneral",   (PyCFunction)Pr_PrGeneral,              METH_VARARGS,   Pr_PrGeneral__doc__},
        {"PrDrvrVers",  (PyCFunction)Pr_PrDrvrVers,             METH_VARARGS,   Pr_PrDrvrVers__doc__},
        
        {NULL,  (PyCFunction)NULL, 0, NULL}             /* sentinel */