Commit 36f6d779 authored by Andrew M. Kuchling's avatar Andrew M. Kuchling

[Bug #1497414] _self is a reserved word in the WATCOM 10.6 C compiler.

Fix by renaming the variable.

In a different module, Neal fixed it by renaming _self to self.  There's
already a variable named 'self' here, so I used selfptr.

(I'm committing this on a Mac without Tk, but it's a simple search-and-replace.
<crosses fingers>, so  I'll watch the buildbots and see what happens.)
parent 4094b3d0
...@@ -1274,13 +1274,13 @@ Tkapp_CallProc(Tkapp_CallEvent *e, int flags) ...@@ -1274,13 +1274,13 @@ Tkapp_CallProc(Tkapp_CallEvent *e, int flags)
and perform processing there. */ and perform processing there. */
static PyObject * static PyObject *
Tkapp_Call(PyObject *_self, PyObject *args) Tkapp_Call(PyObject *selfptr, PyObject *args)
{ {
Tcl_Obj *objStore[ARGSZ]; Tcl_Obj *objStore[ARGSZ];
Tcl_Obj **objv = NULL; Tcl_Obj **objv = NULL;
int objc, i; int objc, i;
PyObject *res = NULL; PyObject *res = NULL;
TkappObject *self = (TkappObject*)_self; TkappObject *self = (TkappObject*)selfptr;
/* Could add TCL_EVAL_GLOBAL if wrapped by GlobalCall... */ /* Could add TCL_EVAL_GLOBAL if wrapped by GlobalCall... */
int flags = TCL_EVAL_DIRECT; int flags = TCL_EVAL_DIRECT;
...@@ -1326,7 +1326,7 @@ Tkapp_Call(PyObject *_self, PyObject *args) ...@@ -1326,7 +1326,7 @@ Tkapp_Call(PyObject *_self, PyObject *args)
ENTER_OVERLAP ENTER_OVERLAP
if (i == TCL_ERROR) if (i == TCL_ERROR)
Tkinter_Error(_self); Tkinter_Error(selfptr);
else else
res = Tkapp_CallResult(self); res = Tkapp_CallResult(self);
...@@ -1542,12 +1542,12 @@ var_proc(VarEvent* ev, int flags) ...@@ -1542,12 +1542,12 @@ var_proc(VarEvent* ev, int flags)
} }
static PyObject* static PyObject*
var_invoke(EventFunc func, PyObject *_self, PyObject *args, int flags) var_invoke(EventFunc func, PyObject *selfptr, PyObject *args, int flags)
{ {
TkappObject *self = (TkappObject*)_self; TkappObject *self = (TkappObject*)selfptr;
#ifdef WITH_THREAD #ifdef WITH_THREAD
if (self->threaded && self->thread_id != Tcl_GetCurrentThread()) { if (self->threaded && self->thread_id != Tcl_GetCurrentThread()) {
TkappObject *self = (TkappObject*)_self; TkappObject *self = (TkappObject*)selfptr;
VarEvent *ev; VarEvent *ev;
PyObject *res, *exc_type, *exc_val; PyObject *res, *exc_type, *exc_val;
...@@ -1559,7 +1559,7 @@ var_invoke(EventFunc func, PyObject *_self, PyObject *args, int flags) ...@@ -1559,7 +1559,7 @@ var_invoke(EventFunc func, PyObject *_self, PyObject *args, int flags)
ev = (VarEvent*)ckalloc(sizeof(VarEvent)); ev = (VarEvent*)ckalloc(sizeof(VarEvent));
ev->self = _self; ev->self = selfptr;
ev->args = args; ev->args = args;
ev->flags = flags; ev->flags = flags;
ev->func = func; ev->func = func;
...@@ -1579,7 +1579,7 @@ var_invoke(EventFunc func, PyObject *_self, PyObject *args, int flags) ...@@ -1579,7 +1579,7 @@ var_invoke(EventFunc func, PyObject *_self, PyObject *args, int flags)
} }
#endif #endif
/* Tcl is not threaded, or this is the interpreter thread. */ /* Tcl is not threaded, or this is the interpreter thread. */
return func(_self, args, flags); return func(selfptr, args, flags);
} }
static PyObject * static PyObject *
...@@ -2079,9 +2079,9 @@ Tkapp_CommandProc(CommandEvent *ev, int flags) ...@@ -2079,9 +2079,9 @@ Tkapp_CommandProc(CommandEvent *ev, int flags)
} }
static PyObject * static PyObject *
Tkapp_CreateCommand(PyObject *_self, PyObject *args) Tkapp_CreateCommand(PyObject *selfptr, PyObject *args)
{ {
TkappObject *self = (TkappObject*)_self; TkappObject *self = (TkappObject*)selfptr;
PythonCmd_ClientData *data; PythonCmd_ClientData *data;
char *cmdName; char *cmdName;
PyObject *func; PyObject *func;
...@@ -2105,7 +2105,7 @@ Tkapp_CreateCommand(PyObject *_self, PyObject *args) ...@@ -2105,7 +2105,7 @@ Tkapp_CreateCommand(PyObject *_self, PyObject *args)
return PyErr_NoMemory(); return PyErr_NoMemory();
Py_XINCREF(self); Py_XINCREF(self);
Py_XINCREF(func); Py_XINCREF(func);
data->self = _self; data->self = selfptr;
data->func = func; data->func = func;
if (self->threaded && self->thread_id != Tcl_GetCurrentThread()) { if (self->threaded && self->thread_id != Tcl_GetCurrentThread()) {
...@@ -2139,9 +2139,9 @@ Tkapp_CreateCommand(PyObject *_self, PyObject *args) ...@@ -2139,9 +2139,9 @@ Tkapp_CreateCommand(PyObject *_self, PyObject *args)
static PyObject * static PyObject *
Tkapp_DeleteCommand(PyObject *_self, PyObject *args) Tkapp_DeleteCommand(PyObject *selfptr, PyObject *args)
{ {
TkappObject *self = (TkappObject*)_self; TkappObject *self = (TkappObject*)selfptr;
char *cmdName; char *cmdName;
int err; int err;
...@@ -2502,10 +2502,10 @@ Tkapp_CreateTimerHandler(PyObject *self, PyObject *args) ...@@ -2502,10 +2502,10 @@ Tkapp_CreateTimerHandler(PyObject *self, PyObject *args)
/** Event Loop **/ /** Event Loop **/
static PyObject * static PyObject *
Tkapp_MainLoop(PyObject *_self, PyObject *args) Tkapp_MainLoop(PyObject *selfptr, PyObject *args)
{ {
int threshold = 0; int threshold = 0;
TkappObject *self = (TkappObject*)_self; TkappObject *self = (TkappObject*)selfptr;
#ifdef WITH_THREAD #ifdef WITH_THREAD
PyThreadState *tstate = PyThreadState_Get(); PyThreadState *tstate = PyThreadState_Get();
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment