Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | How about the TIP #59 way of TIP #440? "::tcl::pkgconfig get engine" -> "core" |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | tip-440-alt |
Files: | files | file ages | folders |
SHA1: |
fbc9e292ec5740778d438cb38085bdbc |
User & Date: | jan.nijtmans 2016-01-20 22:33:13.209 |
Context
2016-01-20
| ||
22:41 | Of course, the value of "::tcl::pkgconfig get engine" should be "TH1" ... (check-in: fd00816d user: jan.nijtmans tags: tip-440-alt) | |
22:33 | How about the TIP #59 way of TIP #440? "::tcl::pkgconfig get engine" -> "core" ... (check-in: fbc9e292 user: jan.nijtmans tags: tip-440-alt) | |
13:04 | (experiment) Implement "package require Tcl" according to the alternative TIP #440 implementation. ... (check-in: 6bb2308f user: jan.nijtmans tags: tip-440-alt) | |
Changes
Changes to src/th_lang.c.
︙ | ︙ | |||
1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 | ){ static const Th_SubCommand aSub[] = { { "require", package_require_command }, { 0, 0 } }; return Th_CallSubCommand(interp, ctx, argc, argv, argl, aSub); } /* ** Convert the script level frame specification (used by the commands ** [uplevel] and [upvar]) in (zFrame, nFrame) to an integer frame as ** used by Th_LinkVar() and Th_Eval(). If successful, write the integer ** frame level to *piFrame and return TH_OK. Otherwise, return TH_ERROR ** and leave an error message in the interpreter result. | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 | ){ static const Th_SubCommand aSub[] = { { "require", package_require_command }, { 0, 0 } }; return Th_CallSubCommand(interp, ctx, argc, argv, argl, aSub); } /* ** TH Syntax: ** ** package require Tcl */ static int pkgconfig_get_command( Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl ){ if( strcmp(argv[2], "engine") ){ Th_ErrorMessage(interp, "key not known", argv[2], argl[2]); return TH_ERROR; } Th_SetResult(interp, "core" , -1); return TH_OK; } /* ** TH Syntax: ** ** package require Tcl */ static int pkgconfig_command( Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl ){ static const Th_SubCommand aSub[] = { { "get", pkgconfig_get_command }, { 0, 0 } }; return Th_CallSubCommand(interp, ctx, argc, argv, argl, aSub); } /* ** Convert the script level frame specification (used by the commands ** [uplevel] and [upvar]) in (zFrame, nFrame) to an integer frame as ** used by Th_LinkVar() and Th_Eval(). If successful, write the integer ** frame level to *piFrame and return TH_OK. Otherwise, return TH_ERROR ** and leave an error message in the interpreter result. |
︙ | ︙ | |||
1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 | {"breakpoint", breakpoint_command, 0}, {"return", return_command, 0}, {"break", simple_command, (void *)TH_BREAK}, {"continue", simple_command, (void *)TH_CONTINUE}, {"error", simple_command, (void *)TH_ERROR}, {0, 0, 0} }; size_t i; /* Add the language commands. */ for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){ | > > | 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 | {"breakpoint", breakpoint_command, 0}, {"return", return_command, 0}, {"break", simple_command, (void *)TH_BREAK}, {"continue", simple_command, (void *)TH_CONTINUE}, {"error", simple_command, (void *)TH_ERROR}, {"::tcl::pkgconfig", pkgconfig_command, 0}, {0, 0, 0} }; size_t i; /* Add the language commands. */ for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){ |
︙ | ︙ |