]> granicus.if.org Git - python/commitdiff
A few missing casts (Richard Neitzel).
authorGuido van Rossum <guido@python.org>
Thu, 7 Mar 1996 16:16:54 +0000 (16:16 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 7 Mar 1996 16:16:54 +0000 (16:16 +0000)
Don't append Unix paths on a Mac (Jack Jansen).

Tools/modulator/Templates/module_tail
Tools/modulator/genmodule.py
Tools/modulator/modulator.py

index 6ee7645ff4213db5e6b46a28807355a1701b9921..59cc50b6c0c113a06561e47f56a9d465dc37f1a2 100644 (file)
@@ -3,7 +3,7 @@
 
 static struct PyMethodDef $abbrev$_methods[] = {
        $methodlist$
-       {NULL,          NULL}           /* sentinel */
+       {NULL,   (PyCFunction)NULL, 0, NULL}            /* sentinel */
 };
 
 
index bdfe350baadc13e9387ad96f0bb7fc9986b37f5a..e5c69bfdcf280085e77139d12abae2ab20953f43 100755 (executable)
@@ -81,8 +81,9 @@ class module(writer):
        for fn in self.methodlist:
            self.method = fn
            self.addcode('module_method', fp)
-           new_ml = new_ml + ('{"%s",\t%s_%s,\t1,\t%s_%s__doc__},\n'
-                              %(fn, self.abbrev, fn, self.abbrev, fn))
+           new_ml = new_ml + (
+                     '{"%s",\t(PyCFunction)%s_%s,\tMETH_VARARGS,\t%s_%s__doc__},\n'
+                     %(fn, self.abbrev, fn, self.abbrev, fn))
        self.methodlist = new_ml
        self.addcode('module_tail', fp)
 
@@ -107,8 +108,9 @@ class object(writer):
        for fn in self.methodlist:
            self.method = fn
            self.addcode('object_method', fp)
-           new_ml = new_ml + ('{"%s",\t%s_%s,\t1,\t%s_%s__doc__},\n'
-                              %(fn, self.abbrev, fn, self.abbrev, fn))
+           new_ml = new_ml + (
+                     '{"%s",\t(PyCFunction)%s_%s,\tMETH_VARARGS,\t%s_%s__doc__},\n'
+                     %(fn, self.abbrev, fn, self.abbrev, fn))
        self.methodlist = new_ml
        self.addcode('object_mlist', fp)
 
index dd1ade54a093183d45ee0bb182fe0cea05e52cae..02ad80d572c1433ddabb7cc5ed173e9391262b3f 100755 (executable)
@@ -17,7 +17,8 @@
 #
 
 import sys, os
-sys.path.append(os.path.join(os.environ['HOME'], 'src/python/Tools/modulator'))
+if os.name <> 'mac':
+       sys.path.append(os.path.join(os.environ['HOME'], 'src/python/Tools/modulator'))
 
 from Tkinter import *
 from Tkextra import *