Overview
Artifact ID: | c372d923df6b6314a0475165edc9d3ef4873c5bf3d9a25439b081184fbaeb4d7 |
---|---|
Ticket: | b58e6897034fc5292c9d36ba8099d9a835c98172
Return value of `Tcl_Flush` |
User & Date: | dram 2017-10-19 10:55:18 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
It seems that return value description of `Tcl_Flush` in document[1] is not consistent with the implementation, it says result will be `TCL_OK` or `TCL_ERROR`, but sometimes `-1` is returned. e.g.: ``` #include <tcl.h> int main() { Tcl_Interp *interp = Tcl_CreateInterp(); Tcl_Channel channel = Tcl_GetStdChannel(TCL_STDIN); printf("TCL_OK = %d\n", TCL_OK); printf("TCL_ERROR = %d\n", TCL_ERROR); printf("Tcl_Flush(stdin) = %d\n", Tcl_Flush(channel)); Tcl_DeleteInterp(interp); return 0; } ``` Output: ``` TCL_OK = 0 TCL_ERROR = 1 Tcl_Flush(stdin) = -1 ``` [1] https://tcl.tk/man/tcl8.6/TclLib/OpenFileChnl.htm#M19
- is_private changed to: "0"
- login: "dram"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "dram"
- subsystem changed to: "- New Builtin Commands"
- title changed to: "Return value of `Tcl_Flush`"
- type changed to: "Bug"