A few missing casts (Richard Neitzel).

Don't append Unix paths on a Mac (Jack Jansen).
This commit is contained in:
Guido van Rossum 1996-03-07 16:16:54 +00:00
parent 2429c722d7
commit a0e2422615
3 changed files with 9 additions and 6 deletions

View File

@ -3,7 +3,7 @@
static struct PyMethodDef $abbrev$_methods[] = {
$methodlist$
{NULL, NULL} /* sentinel */
{NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */
};

View File

@ -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)

View File

@ -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 *