tcl-websh-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@dedasys.com (David N. Welton)
Subject Re: fixme's
Date Fri, 22 Feb 2002 12:09:12 GMT
Ronnie Brunner <ronnie@netcetera.ch> writes:

> > 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 ...)

Yes.  I'll try and figure out a test case for this...

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
     Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
   Apache Tcl: http://tcl.apache.org/

---------------------------------------------------------------------
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