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]