SHA256
3
0
forked from pool/tcl
tcl/itcl-unbreak-iwidgets.patch
Reinhard Max 25b5a59767 - New version 8.6.3:
- Add itcl-unbreak-iwidgets.patch to revert a recent change in
  itcl that broke iwidgets.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:tcl/tcl?expand=0&rev=81
2014-11-12 15:59:29 +00:00

215 lines
7.9 KiB
Diff

Index: generic/itclBase.c
==================================================================
--- generic/itclBase.c
+++ generic/itclBase.c
@@ -319,11 +319,11 @@
Tcl_InitObjHashTable(&infoPtr->nameClasses);
Tcl_InitHashTable(&infoPtr->namespaceClasses, TCL_ONE_WORD_KEYS);
Tcl_InitHashTable(&infoPtr->procMethods, TCL_ONE_WORD_KEYS);
Tcl_InitObjHashTable(&infoPtr->instances);
Tcl_InitHashTable(&infoPtr->objectInstances, TCL_ONE_WORD_KEYS);
- Tcl_InitObjHashTable(&infoPtr->myEnsembles);
+// Tcl_InitObjHashTable(&infoPtr->myEnsembles);
Tcl_InitObjHashTable(&infoPtr->classTypes);
infoPtr->ensembleInfo = (EnsembleInfo *)ckalloc(sizeof(EnsembleInfo));
memset(infoPtr->ensembleInfo, 0, sizeof(EnsembleInfo));
Tcl_InitHashTable(&infoPtr->ensembleInfo->ensembles, TCL_ONE_WORD_KEYS);
Tcl_InitHashTable(&infoPtr->ensembleInfo->subEnsembles, TCL_ONE_WORD_KEYS);
Index: generic/itclInt.h
==================================================================
--- generic/itclInt.h
+++ generic/itclInt.h
@@ -148,12 +148,12 @@
Tcl_HashTable nameClasses; /* maps from fullNamePtr to iclsPtr */
Tcl_HashTable namespaceClasses; /* maps from nsPtr to iclsPtr */
Tcl_HashTable procMethods; /* maps from procPtr to mFunc */
Tcl_HashTable instances; /* maps from instanceNumber to ioPtr */
Tcl_HashTable objectInstances; /* maps from ioPtr to instanceNumber */
- Tcl_HashTable myEnsembles; /* maps from ensemble name (::itcl::find)
- * etc. to ensemble pathName */
+// Tcl_HashTable myEnsembles; /* maps from ensemble name (::itcl::find)
+// * etc. to ensemble pathName */
Tcl_HashTable classTypes; /* maps from class type i.e. "widget"
* to define value i.e. ITCL_WIDGET */
int protection; /* protection level currently in effect */
int useOldResolvers; /* whether to use the "old" style
* resolvers or the CallFrame resolvers */
Index: generic/itclParse.c
==================================================================
--- generic/itclParse.c
+++ generic/itclParse.c
@@ -187,17 +187,17 @@
int
Itcl_ParseInit(
Tcl_Interp *interp, /* interpreter to be updated */
ItclObjectInfo *infoPtr) /* info regarding all known objects and classes */
{
- Tcl_HashEntry *hPtr;
+// Tcl_HashEntry *hPtr;
Tcl_Namespace *parserNs;
- Tcl_Obj *objPtr;
- Tcl_Obj *namePtr;
+// Tcl_Obj *objPtr;
+// Tcl_Obj *namePtr;
ProtectionCmdInfo *pInfoPtr;
Tcl_DString buffer;
- int isNew;
+// int isNew;
int i;
/*
* Create the "itcl::parser" namespace used to parse class
* definitions.
@@ -264,16 +264,18 @@
* Create the "itcl::find" command for high-level queries.
*/
if (Itcl_CreateEnsemble(interp, "::itcl::find") != TCL_OK) {
return TCL_ERROR;
}
+/*
namePtr = Tcl_NewStringObj("::itcl::find", -1);
objPtr = Tcl_GetObjResult(interp);
Tcl_IncrRefCount(objPtr);
hPtr = Tcl_CreateHashEntry(&infoPtr->myEnsembles, (char *)namePtr, &isNew);
Tcl_SetHashValue(hPtr, objPtr);
Tcl_DecrRefCount(namePtr);
+*/
if (Itcl_AddEnsemblePart(interp, "::itcl::find",
"classes", "?pattern?",
Itcl_FindClassesCmd,
(ClientData)infoPtr, Itcl_ReleaseData) != TCL_OK) {
@@ -295,16 +297,18 @@
* and classes.
*/
if (Itcl_CreateEnsemble(interp, "::itcl::delete") != TCL_OK) {
return TCL_ERROR;
}
+/*
namePtr = Tcl_NewStringObj("::itcl::delete", -1);
objPtr = Tcl_GetObjResult(interp);
Tcl_IncrRefCount(objPtr);
hPtr = Tcl_CreateHashEntry(&infoPtr->myEnsembles, (char *)namePtr, &isNew);
Tcl_SetHashValue(hPtr, objPtr);
Tcl_DecrRefCount(namePtr);
+*/
if (Itcl_AddEnsemblePart(interp, "::itcl::delete",
"class", "name ?name...?",
Itcl_DelClassCmd,
(ClientData)infoPtr, Itcl_ReleaseData) != TCL_OK) {
@@ -333,16 +337,18 @@
* and classes existence.
*/
if (Itcl_CreateEnsemble(interp, "::itcl::is") != TCL_OK) {
return TCL_ERROR;
}
+/*
namePtr = Tcl_NewStringObj("::itcl::is", -1);
objPtr = Tcl_GetObjResult(interp);
Tcl_IncrRefCount(objPtr);
hPtr = Tcl_CreateHashEntry(&infoPtr->myEnsembles, (char *)namePtr, &isNew);
Tcl_SetHashValue(hPtr, objPtr);
Tcl_DecrRefCount(namePtr);
+*/
if (Itcl_AddEnsemblePart(interp, "::itcl::is",
"class", "name", Itcl_IsClassCmd,
(ClientData)infoPtr, Itcl_ReleaseData) != TCL_OK) {
return TCL_ERROR;
@@ -382,31 +388,35 @@
if (Itcl_AddEnsemblePart(interp, "::itcl::filter",
"delete", "objectOrClass filter ? ... ?", Itcl_FilterDeleteCmd,
(ClientData)infoPtr, Itcl_ReleaseData) != TCL_OK) {
return TCL_ERROR;
}
+/*
namePtr = Tcl_NewStringObj("::itcl::filter", -1);
objPtr = Tcl_GetObjResult(interp);
Tcl_IncrRefCount(objPtr);
hPtr = Tcl_CreateHashEntry(&infoPtr->myEnsembles, (char *)namePtr, &isNew);
Tcl_SetHashValue(hPtr, objPtr);
Tcl_DecrRefCount(namePtr);
+*/
Itcl_PreserveData((ClientData)infoPtr);
/*
* Add the "forward" commands (add/delete)
*/
if (Itcl_CreateEnsemble(interp, "::itcl::forward") != TCL_OK) {
return TCL_ERROR;
}
+/*
namePtr = Tcl_NewStringObj("::itcl::forward", -1);
objPtr = Tcl_GetObjResult(interp);
Tcl_IncrRefCount(objPtr);
hPtr = Tcl_CreateHashEntry(&infoPtr->myEnsembles, (char *)namePtr, &isNew);
Tcl_SetHashValue(hPtr, objPtr);
Tcl_DecrRefCount(namePtr);
+*/
if (Itcl_AddEnsemblePart(interp, "::itcl::forward",
"add", "objectOrClass srcCommand targetCommand ? options ... ?",
Itcl_ForwardAddCmd, (ClientData)infoPtr,
Itcl_ReleaseData) != TCL_OK) {
@@ -426,16 +436,18 @@
* Add the "mixin" (add/delete) commands.
*/
if (Itcl_CreateEnsemble(interp, "::itcl::mixin") != TCL_OK) {
return TCL_ERROR;
}
+/*
namePtr = Tcl_NewStringObj("::itcl::mixin", -1);
objPtr = Tcl_GetObjResult(interp);
Tcl_IncrRefCount(objPtr);
hPtr = Tcl_CreateHashEntry(&infoPtr->myEnsembles, (char *)namePtr, &isNew);
Tcl_SetHashValue(hPtr, objPtr);
Tcl_DecrRefCount(namePtr);
+*/
if (Itcl_AddEnsemblePart(interp, "::itcl::mixin",
"add", "objectOrClass class ? class ... ?",
Itcl_MixinAddCmd, (ClientData)infoPtr,
Itcl_ReleaseData) != TCL_OK) {
@@ -455,15 +467,17 @@
* Add commands for handling import stubs at the Tcl level.
*/
if (Itcl_CreateEnsemble(interp, "::itcl::import::stub") != TCL_OK) {
return TCL_ERROR;
}
+/*
namePtr = Tcl_NewStringObj("::itcl::stubs", -1);
objPtr = Tcl_GetObjResult(interp);
hPtr = Tcl_CreateHashEntry(&infoPtr->myEnsembles, (char *)namePtr, &isNew);
Tcl_SetHashValue(hPtr, objPtr);
Tcl_DecrRefCount(namePtr);
+*/
if (Itcl_AddEnsemblePart(interp, "::itcl::import::stub",
"create", "name", Itcl_StubCreateCmd,
(ClientData)NULL, (Tcl_CmdDeleteProc*)NULL) != TCL_OK) {
return TCL_ERROR;
@@ -529,16 +543,18 @@
* Add the "delegate" (method/option) commands.
*/
if (Itcl_CreateEnsemble(interp, "::itcl::parser::delegate") != TCL_OK) {
return TCL_ERROR;
}
+/*
namePtr = Tcl_NewStringObj("::itcl::delegate", -1);
objPtr = Tcl_GetObjResult(interp);
Tcl_IncrRefCount(objPtr);
hPtr = Tcl_CreateHashEntry(&infoPtr->myEnsembles, (char *)namePtr, &isNew);
Tcl_SetHashValue(hPtr, objPtr);
Tcl_DecrRefCount(namePtr);
+*/
if (Itcl_AddEnsemblePart(interp, "::itcl::parser::delegate",
"method", "name to targetName as scipt using script",
Itcl_ClassDelegateMethodCmd, (ClientData)infoPtr,
Itcl_ReleaseData) != TCL_OK) {