| 145 | *---------------------------------------------------------------------- |
| 146 | */ |
| 147 | |
| 148 | void |
| 149 | Tcl_SetStartupScript( |
| 150 | Tcl_Obj *path, /* Filesystem path of startup script file */ |
| 151 | CONST char *encoding) /* Encoding of the data in that file */ |
| 152 | { |
| 153 | Tcl_Obj *newEncoding = NULL; |
| 154 | if (encoding != NULL) { |
| 155 | newEncoding = Tcl_NewStringObj(encoding, -1); |
| 156 | } |
| 157 | |
| 158 | if (tclStartupScriptPath != NULL) { |
| 159 | Tcl_DecrRefCount(tclStartupScriptPath); |
| 160 | } |
| 161 | tclStartupScriptPath = path; |
| 162 | if (tclStartupScriptPath != NULL) { |
| 163 | Tcl_IncrRefCount(tclStartupScriptPath); |
| 164 | } |
| 165 | |
| 166 | if (tclStartupScriptEncoding != NULL) { |
| 167 | Tcl_DecrRefCount(tclStartupScriptEncoding); |
| 168 | } |
| 169 | tclStartupScriptEncoding = newEncoding; |
| 170 | if (tclStartupScriptEncoding != NULL) { |
| 171 | Tcl_IncrRefCount(tclStartupScriptEncoding); |
| 172 | } |
| 173 | } |
| 174 | |
| 175 |
no outgoing calls
no test coverage detected