tcl-websh-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronnie Brunner <ron...@netcetera.ch>
Subject Re: fixme's
Date Thu, 21 Feb 2002 17:04:47 GMT
> How about just doing this?  (In interpool.c)
> 
> 	stat statPtr;
> 	if (Tcl_Access(id, R_OK) != 0 ||
> 	    Tcl_Stat(id, &statPtr) != TCL_OK)
> 	{
> 	    return NULL;
> 	}
> 	mtime = statPtr->st_mtime;

If that does the trick (of getting mtime) -> great.

> Although it seems to me that the code above is not right, as it
> shouldn't be putting anything into mtime, which is defined here:

The point is: we get filename with mtime to check whether we need to
reload the code of the script (we only do so if mtime is diffeent from
what we have initially loaded/sourced in the interpreter)

However, if web::interpmap (this command again ...) returns a
different script id which is != filename, than we don't need to check
mtime of filename (the one we got as parameter to the function call) but
rather mtime of id, which we try to get with the code in question.

Does that make sense? (It's kind of the same problem we forgot to
implement when checking for the 404 ...)

Ronnie
------------------------------------------------------------------------
Ronnie Brunner                               ronnie.brunner@netcetera.ch
Netcetera AG, 8040 Zuerich    phone +41 1 247 79 79 Fax: +41 1 247 70 75

---------------------------------------------------------------------
To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-dev-help@tcl.apache.org


Mime
View raw message