Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Remove unneeded SetOptionFromAny and SetTextIndexFromAny. They were only needed to prevent a panic in Tcl, but Tcl now generates a nice error-message in stead of panicing. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
b1a5b20004877817f041bffa49da86ff |
User & Date: | jan.nijtmans 2013-02-26 12:18:40 |
Context
2013-02-27
| ||
12:36 | Eliminate all Tcl_GetIndexFromObj calls, which is only a thin wrapper around Tcl_GetIndexFromObjStruct. check-in: ac229dab user: jan.nijtmans tags: trunk | |
2013-02-26
| ||
13:15 | merge trunk check-in: 791edffc user: jan.nijtmans tags: novem-support | |
12:18 | Remove unneeded SetOptionFromAny and SetTextIndexFromAny. They were only needed to prevent a panic in Tcl, but Tcl now generates a nice error-message in stead of panicing. check-in: b1a5b200 user: jan.nijtmans tags: trunk | |
2013-02-25
| ||
20:33 | Put mutex around XInitThreads call, making sure it is only called once. check-in: 557c73ca user: jan.nijtmans tags: trunk | |
Changes
Changes to generic/tkConfig.c.
︙ | ︙ | |||
124 125 126 127 128 129 130 | static Tcl_Obj * GetObjectForOption(char *recordPtr, Option *optionPtr, Tk_Window tkwin); static Option * GetOption(const char *name, OptionTable *tablePtr); static Option * GetOptionFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, OptionTable *tablePtr); static int ObjectIsEmpty(Tcl_Obj *objPtr); static void FreeOptionInternalRep(Tcl_Obj *objPtr); | < | | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | static Tcl_Obj * GetObjectForOption(char *recordPtr, Option *optionPtr, Tk_Window tkwin); static Option * GetOption(const char *name, OptionTable *tablePtr); static Option * GetOptionFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, OptionTable *tablePtr); static int ObjectIsEmpty(Tcl_Obj *objPtr); static void FreeOptionInternalRep(Tcl_Obj *objPtr); /* * The structure below defines an object type that is used to cache the result * of looking up an option name. If an object has this type, then its * internalPtr1 field points to the OptionTable in which it was looked up, and * the internalPtr2 field points to the entry that matched. */ static const Tcl_ObjType optionObjType = { "option", /* name */ FreeOptionInternalRep, /* freeIntRepProc */ NULL, /* dupIntRepProc */ NULL, /* updateStringProc */ NULL /* setFromAnyProc */ }; /* *-------------------------------------------------------------- * * Tk_CreateOptionTable -- * |
︙ | ︙ | |||
1196 1197 1198 1199 1200 1201 1202 | optionPtr = GetOption(name, (OptionTable *) optionTable); if (optionPtr == NULL) { return NULL; } return optionPtr->specPtr; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 | optionPtr = GetOption(name, (OptionTable *) optionTable); if (optionPtr == NULL) { return NULL; } return optionPtr->specPtr; } /* *---------------------------------------------------------------------- * * FreeOptionInternalRep -- * * Part of the option Tcl object type implementation. Frees the storage |
︙ | ︙ |
Changes to generic/tkTextIndex.c.
︙ | ︙ | |||
44 45 46 47 48 49 50 | /* * The "textindex" Tcl_Obj definition: */ static void DupTextIndexInternalRep(Tcl_Obj *srcPtr, Tcl_Obj *copyPtr); static void FreeTextIndexInternalRep(Tcl_Obj *listPtr); | < < | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | /* * The "textindex" Tcl_Obj definition: */ static void DupTextIndexInternalRep(Tcl_Obj *srcPtr, Tcl_Obj *copyPtr); static void FreeTextIndexInternalRep(Tcl_Obj *listPtr); static void UpdateStringOfTextIndex(Tcl_Obj *objPtr); /* * Accessor macros for the "textindex" type. */ #define GET_TEXTINDEX(objPtr) \ |
︙ | ︙ | |||
71 72 73 74 75 76 77 | */ const Tcl_ObjType tkTextIndexType = { "textindex", /* name */ FreeTextIndexInternalRep, /* freeIntRepProc */ DupTextIndexInternalRep, /* dupIntRepProc */ NULL, /* updateStringProc */ | | | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | */ const Tcl_ObjType tkTextIndexType = { "textindex", /* name */ FreeTextIndexInternalRep, /* freeIntRepProc */ DupTextIndexInternalRep, /* dupIntRepProc */ NULL, /* updateStringProc */ NULL /* setFromAnyProc */ }; static void FreeTextIndexInternalRep( Tcl_Obj *indexObjPtr) /* TextIndex object with internal rep to * free. */ { |
︙ | ︙ | |||
138 139 140 141 142 143 144 | len = TkTextPrintIndex(indexPtr->textPtr, indexPtr, buffer); objPtr->bytes = ckalloc(len + 1); strcpy(objPtr->bytes, buffer); objPtr->length = len; } | < < < < < < < < < < < < | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | len = TkTextPrintIndex(indexPtr->textPtr, indexPtr, buffer); objPtr->bytes = ckalloc(len + 1); strcpy(objPtr->bytes, buffer); objPtr->length = len; } /* *--------------------------------------------------------------------------- * * MakeObjIndex -- * * This function generates a Tcl_Obj description of an index, suitable |
︙ | ︙ |