FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

A few missing casts (Richard Neitzel). · java66liu/python@fe23ff4 · GitHub

forked from glix/python

Commit fe23ff4

Browse files
guido
committed
A few missing casts (Richard Neitzel).
Don't append Unix paths on a Mac (Jack Jansen). git-svn-id: http://svn.python.org/projects/python/trunk@5912 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent febe541 commit fe23ff4

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

‎Tools/modulator/Templates/module_tail‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
static struct PyMethodDef $abbrev$_methods[] = {
55
$methodlist$
6-
{NULL, NULL} /* sentinel */
6+
{NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */
77
};
88

99

‎Tools/modulator/genmodule.py‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ def writecode(self, fp):
8181
for fn in self.methodlist:
8282
self.method = fn
8383
self.addcode('module_method', fp)
84-
new_ml = new_ml + ('{"%s",\t%s_%s,\t1,\t%s_%s__doc__},\n'
85-
%(fn, self.abbrev, fn, self.abbrev, fn))
84+
new_ml = new_ml + (
85+
'{"%s",\t(PyCFunction)%s_%s,\tMETH_VARARGS,\t%s_%s__doc__},\n'
86+
%(fn, self.abbrev, fn, self.abbrev, fn))
8687
self.methodlist = new_ml
8788
self.addcode('module_tail', fp)
8889

@@ -107,8 +108,9 @@ def writebody(self, fp):
107108
for fn in self.methodlist:
108109
self.method = fn
109110
self.addcode('object_method', fp)
110-
new_ml = new_ml + ('{"%s",\t%s_%s,\t1,\t%s_%s__doc__},\n'
111-
%(fn, self.abbrev, fn, self.abbrev, fn))
111+
new_ml = new_ml + (
112+
'{"%s",\t(PyCFunction)%s_%s,\tMETH_VARARGS,\t%s_%s__doc__},\n'
113+
%(fn, self.abbrev, fn, self.abbrev, fn))
112114
self.methodlist = new_ml
113115
self.addcode('object_mlist', fp)
114116

‎Tools/modulator/modulator.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
#
1818

1919
import sys, os
20-
sys.path.append(os.path.join(os.environ['HOME'], 'src/python/Tools/modulator'))
20+
if os.name <> 'mac':
21+
sys.path.append(os.path.join(os.environ['HOME'], 'src/python/Tools/modulator'))
2122

2223
from Tkinter import *
2324
from Tkextra import *

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL