diff options
author | Guido van Rossum <guido@python.org> | 1996-03-07 16:16:54 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-03-07 16:16:54 (GMT) |
commit | a0e2422615c1826fdbe963f4116eb6b3edccb951 (patch) | |
tree | b1b4f848c8fa01c2d157aa90f22f704092eca4ba /Tools | |
parent | 2429c722d7613336a6a71dc8bd6e07b50024c8aa (diff) | |
download | cpython-a0e2422615c1826fdbe963f4116eb6b3edccb951.zip cpython-a0e2422615c1826fdbe963f4116eb6b3edccb951.tar.gz cpython-a0e2422615c1826fdbe963f4116eb6b3edccb951.tar.bz2 |
A few missing casts (Richard Neitzel).
Don't append Unix paths on a Mac (Jack Jansen).
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/modulator/Templates/module_tail | 2 | ||||
-rwxr-xr-x | Tools/modulator/genmodule.py | 10 | ||||
-rwxr-xr-x | Tools/modulator/modulator.py | 3 |
3 files changed, 9 insertions, 6 deletions
diff --git a/Tools/modulator/Templates/module_tail b/Tools/modulator/Templates/module_tail index 6ee7645..59cc50b 100644 --- a/Tools/modulator/Templates/module_tail +++ b/Tools/modulator/Templates/module_tail @@ -3,7 +3,7 @@ static struct PyMethodDef $abbrev$_methods[] = { $methodlist$ - {NULL, NULL} /* sentinel */ + {NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */ }; diff --git a/Tools/modulator/genmodule.py b/Tools/modulator/genmodule.py index bdfe350..e5c69bf 100755 --- a/Tools/modulator/genmodule.py +++ b/Tools/modulator/genmodule.py @@ -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) diff --git a/Tools/modulator/modulator.py b/Tools/modulator/modulator.py index dd1ade5..02ad80d 100755 --- a/Tools/modulator/modulator.py +++ b/Tools/modulator/modulator.py @@ -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 * |