summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-11-26 21:39:48 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2002-11-26 21:39:48 (GMT)
commit8c8aa5d666726253b50e460c825ae3935d099c06 (patch)
tree5267e1c5f22040b85b724b8a0f2674641551bb6b
parent94e7bb7dd67ae72ea1184fa7860c9d4c76acb41b (diff)
downloadcpython-8c8aa5d666726253b50e460c825ae3935d099c06.zip
cpython-8c8aa5d666726253b50e460c825ae3935d099c06.tar.gz
cpython-8c8aa5d666726253b50e460c825ae3935d099c06.tar.bz2
Rename want_objects to wantobjects throughout, for consistency.
-rw-r--r--Doc/whatsnew/whatsnew23.tex2
-rw-r--r--Lib/lib-tk/Tkinter.py4
-rw-r--r--Misc/NEWS2
-rw-r--r--Modules/_tkinter.c20
4 files changed, 14 insertions, 14 deletions
diff --git a/Doc/whatsnew/whatsnew23.tex b/Doc/whatsnew/whatsnew23.tex
index c3b8e8f..444ac16 100644
--- a/Doc/whatsnew/whatsnew23.tex
+++ b/Doc/whatsnew/whatsnew23.tex
@@ -1300,7 +1300,7 @@ by invoking
\begin{verbatim}
import Tkinter
-Tkinter.want_objects = 0
+Tkinter.wantobjects = 0
\end{verbatim}
before creating the first \class{tkapp} object.
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index f222007..833aad5 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -45,7 +45,7 @@ try:
except ImportError:
_MacOS = None
-want_objects = 1
+wantobjects = 1
TkVersion = float(_tkinter.TK_VERSION)
TclVersion = float(_tkinter.TCL_VERSION)
@@ -1523,7 +1523,7 @@ class Tk(Misc, Wm):
if ext not in ('.py', '.pyc', '.pyo'):
baseName = baseName + ext
self.tk = _tkinter.create(screenName, baseName, className)
- self.tk.wantobjects(want_objects)
+ self.tk.wantobjects(wantobjects)
if _MacOS and hasattr(_MacOS, 'SchedParams'):
# Disable event scanning except for Command-Period
_MacOS.SchedParams(1, 0)
diff --git a/Misc/NEWS b/Misc/NEWS
index a5190c7..248382c 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -317,7 +317,7 @@ Extension modules
- _tkinter now returns Tcl objects, instead of strings. Objects which
have Python equivalents are converted to Python objects, other objects
are wrapped. This can be configured through the wantobjects method,
- or Tkinter.want_objects.
+ or Tkinter.wantobjects.
- The PyBSDDB wrapper around the Sleepycat Berkeley DB library has been
added as the package bsddb. The traditional bsddb module is still
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index b74641e..5b83c51 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -221,7 +221,7 @@ static PyTypeObject Tkapp_Type;
typedef struct {
PyObject_HEAD
Tcl_Interp *interp;
- int want_objects;
+ int wantobjects;
} TkappObject;
#define Tkapp_Check(v) ((v)->ob_type == &Tkapp_Type)
@@ -523,7 +523,7 @@ static void DisableEventHook(void); /* Forward */
static TkappObject *
Tkapp_New(char *screenName, char *baseName, char *className,
- int interactive, int want_objects)
+ int interactive, int wantobjects)
{
TkappObject *v;
char *argv0;
@@ -533,7 +533,7 @@ Tkapp_New(char *screenName, char *baseName, char *className,
return NULL;
v->interp = Tcl_CreateInterp();
- v->want_objects = want_objects;
+ v->wantobjects = wantobjects;
#if defined(macintosh)
/* This seems to be needed */
@@ -901,7 +901,7 @@ Tkapp_Call(PyObject *self, PyObject *args)
ENTER_OVERLAP
if (i == TCL_ERROR)
Tkinter_Error(self);
- else if(((TkappObject*)self)->want_objects) {
+ else if(((TkappObject*)self)->wantobjects) {
Tcl_Obj *value = Tcl_GetObjResult(interp);
/* Not sure whether the IncrRef is necessary, but something
may overwrite the interpreter result while we are
@@ -1967,10 +1967,10 @@ static PyObject *
Tkapp_WantObjects(PyObject *self, PyObject *args)
{
- int want_objects;
- if (!PyArg_ParseTuple(args, "i:wantobjects", &want_objects))
+ int wantobjects;
+ if (!PyArg_ParseTuple(args, "i:wantobjects", &wantobjects))
return NULL;
- ((TkappObject*)self)->want_objects = want_objects;
+ ((TkappObject*)self)->wantobjects = wantobjects;
Py_INCREF(Py_None);
return Py_None;
@@ -2179,7 +2179,7 @@ Tkinter_Create(PyObject *self, PyObject *args)
char *baseName = NULL;
char *className = NULL;
int interactive = 0;
- int want_objects = 0;
+ int wantobjects = 0;
baseName = strrchr(Py_GetProgramName(), '/');
if (baseName != NULL)
@@ -2190,11 +2190,11 @@ Tkinter_Create(PyObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "|zssi:create",
&screenName, &baseName, &className,
- &interactive, &want_objects))
+ &interactive, &wantobjects))
return NULL;
return (PyObject *) Tkapp_New(screenName, baseName, className,
- interactive, want_objects);
+ interactive, wantobjects);
}
static PyMethodDef moduleMethods[] =