25 Jan 10:30
Re: tclkit and Tcl_SetResult
From: Harald Oehlmann <Harald.Oehlmann <at> Elmicron.de>
Subject: Re: tclkit and Tcl_SetResult
Newsgroups: gmane.comp.lang.tcl.starkit
Date: 2008-01-25 09:30:52 GMT
Subject: Re: tclkit and Tcl_SetResult
Newsgroups: gmane.comp.lang.tcl.starkit
Date: 2008-01-25 09:30:52 GMT
Hello Avs, sorry, I don't know why your system crashes. I am eventually not the person analysing this. Pleas specify the starkit and tcl version and perhaps the download place where you got it from. Anyway, I program regulary C extensions with starkits on windows. I would encourage you to use the object interface of TCL. To return the result I would recomment for a zero-terminated string: Tcl_Obj * ResultObj; ResultObj = Tcl_NewStringObj(pStringUtf8, -1); Tcl_SetObjResult(interp, ResultObj); Hope this helps, Harald > I have a question concerning usage of C libraries with tclkitsh.exe > under Windows: > > I have a C library (it just returns mtime of the given file in UTC > format with the help of GetFileTime function). > > Everything works under normal tclsh or wish, but if I try using this > library from tclkitsh.exe or tclkit.exe: > Application crashes during this command from C code: > Tcl_SetResult(interp, res, TCL_VOLATILE); This error is fatal, it > cannot be even catch from tcl code. > > Changing TCL_VOLATILE to TCL_<anything_else> like TCL_STATIC does not > help.
RSS Feed