mirror of
https://github.com/tcltk/tcl.git
synced 2026-05-29 00:27:49 +08:00
Fix [7da6c2d04c]: fileevent poor performance due to shimmering
This commit is contained in:
@@ -27,6 +27,7 @@ to the userbase.
|
||||
- [Building sqlite3 for tcl8 redefines typedef](https://core.tcl-lang.org/tcl/info/ad08bc)
|
||||
- [Inconsistent file join with volume-relative arguments](https://core.tcl-lang.org/tcl/info/1215dc)
|
||||
- [mind PTHREAD_NULL as sentinel value vs legitimate pthread_t arg](https://core.tcl-lang.org/tcl/info/673f2d)
|
||||
- [fileevent poor performance due to shimmering](https://core.tcl-lang.org/tcl/info/7da6c2)
|
||||
|
||||
# Updated bundled packages, libraries, standards, data
|
||||
- autoconf 2.73
|
||||
|
||||
@@ -9238,6 +9238,7 @@ Tcl_FileEventObjCmd(
|
||||
const char *chanName;
|
||||
int modeIndex; /* Index of mode argument. */
|
||||
int mask;
|
||||
Tcl_Size length; /* llength of callback script */
|
||||
static const char *const modeOptions[] = {"readable", "writable", NULL};
|
||||
static const int maskArray[] = {TCL_READABLE, TCL_WRITABLE};
|
||||
|
||||
@@ -9285,7 +9286,12 @@ Tcl_FileEventObjCmd(
|
||||
* If we are supposed to delete a stored script, do so.
|
||||
*/
|
||||
|
||||
if (*(TclGetString(objv[3])) == '\0') {
|
||||
if ((objv[3]->bytes == NULL) && TclObjTypeHasProc(objv[3], lengthProc)) {
|
||||
length = TclObjTypeLength(objv[3]);
|
||||
} else {
|
||||
TclGetStringFromObj(objv[3], &length);
|
||||
}
|
||||
if (0 == length) {
|
||||
DeleteScriptRecord(interp, chanPtr, mask);
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user