diff options
author | sebres <sebres@users.sourceforge.net> | 2019-07-12 12:18:00 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2019-07-12 12:18:00 (GMT) |
commit | eb8924753ecc939c45fa78ca5f3f854e213f5f01 (patch) | |
tree | 3c71aa612fba891410acd982ac3278a4683eb85f /win/tclWinTest.c | |
parent | b2b3391857e3e0d0c9ad4805b07168c2caf29333 (diff) | |
parent | 30fc501320ef1a28a3f8630f1beabfce3a8f69f0 (diff) | |
download | tcl-eb8924753ecc939c45fa78ca5f3f854e213f5f01.zip tcl-eb8924753ecc939c45fa78ca5f3f854e213f5f01.tar.gz tcl-eb8924753ecc939c45fa78ca5f3f854e213f5f01.tar.bz2 |
merge 8.6, integrate branch bug-4718b41c56, rebuild win/configure, conflicts resolved (nothreads not available for 8.7)
Diffstat (limited to 'win/tclWinTest.c')
-rw-r--r-- | win/tclWinTest.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/win/tclWinTest.c b/win/tclWinTest.c index 40be3d5..c06f10a 100644 --- a/win/tclWinTest.c +++ b/win/tclWinTest.c @@ -41,6 +41,8 @@ static int TestwinclockCmd(ClientData dummy, Tcl_Interp* interp, int objc, Tcl_Obj *const objv[]); static int TestwinsleepCmd(ClientData dummy, Tcl_Interp* interp, int objc, Tcl_Obj *const objv[]); +static int TestSizeCmd(ClientData dummy, Tcl_Interp* interp, + int objc, Tcl_Obj *const objv[]); static Tcl_ObjCmdProc TestExceptionCmd; static int TestplatformChmod(const char *nativePath, int pmode); static int TestchmodCmd(ClientData dummy, Tcl_Interp* interp, @@ -78,6 +80,7 @@ TclplatformtestInit( Tcl_CreateObjCommand(interp, "testwinclock", TestwinclockCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "testwinsleep", TestwinsleepCmd, NULL, NULL); Tcl_CreateObjCommand(interp, "testexcept", TestExceptionCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "testsize", TestSizeCmd, NULL, NULL); return TCL_OK; } @@ -310,6 +313,26 @@ TestwinsleepCmd( return TCL_OK; } +static int +TestSizeCmd( + ClientData clientData, /* Unused */ + Tcl_Interp* interp, /* Tcl interpreter */ + int objc, /* Parameter count */ + Tcl_Obj *const * objv) /* Parameter vector */ +{ + if (objc != 2) { + goto syntax; + } + if (strcmp(Tcl_GetString(objv[1]), "time_t") == 0) { + Tcl_SetObjResult(interp, Tcl_NewWideIntObj(sizeof(time_t))); + return TCL_OK; + } + +syntax: + Tcl_WrongNumArgs(interp, 1, objv, "time_t"); + return TCL_ERROR; +} + /* *---------------------------------------------------------------------- * |