For Programmers: Free Programming Magazines  


Home > Archive > Tcl > November 2007 > Do NOT access interp->result









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Do NOT access interp->result
Donald G Porter

2007-11-29, 10:14 pm

jmbussat wrote:
> /* Initialize TCL */
> if (Tcl_Init(interp) == TCL_ERROR) {
> //fprintf(stderr, "Tcl_Init failed: %s\n", interp->result);
> sprintf(str,"Tcl_Init failed: %s\n", interp->result);
> LDialog_AlertBox(str);
> return;
> }


Please, please, please stop doing that. Get some code
examples written in this century to copy and modify.

Replace reads from interp->result with
Tcl_GetStringResult(interp).

Now, that's not the cause of your crashes, but it is
so annoying I had to post separately on the matter.

--
| Don Porter Mathematical and Computational Sciences Division |
| donald.porter@nist.gov Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|_______________________________________
_______________________________|
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com