[PD-cvs] SF.net SVN: pure-data: [9538] branches/pd-extended/v0-40/pd/src/t_tkcmd.c

eighthave at users.sourceforge.net eighthave at users.sourceforge.net
Thu Mar 6 06:32:12 CET 2008


Revision: 9538
          http://pure-data.svn.sourceforge.net/pure-data/?rev=9538&view=rev
Author:   eighthave
Date:     2008-03-05 21:32:12 -0800 (Wed, 05 Mar 2008)

Log Message:
-----------
Changed Tcl_Eval() to use a Tcl_Obj and Tcl_EvalObjEx(), which is apparently supposed to use bytecode caching as well as not written some deprecated things.  Hopefully this will solve both the $text_color variable issues on Windows and make things faster too.

Modified Paths:
--------------
    branches/pd-extended/v0-40/pd/src/t_tkcmd.c

Modified: branches/pd-extended/v0-40/pd/src/t_tkcmd.c
===================================================================
--- branches/pd-extended/v0-40/pd/src/t_tkcmd.c	2008-03-05 18:08:36 UTC (rev 9537)
+++ branches/pd-extended/v0-40/pd/src/t_tkcmd.c	2008-03-06 05:32:12 UTC (rev 9538)
@@ -546,11 +546,11 @@
 
 void tcl_mess(char *s)
 {
-    int result;
-    result = Tcl_Eval(tk_pdinterp,  s);
+    Tcl_Obj *tk_stringobj = Tcl_NewStringObj(s,strlen(s));
+    int result = Tcl_EvalObjEx(tk_pdinterp, tk_stringobj, TCL_EVAL_GLOBAL);
     if (result != TCL_OK)
     {
-        if (*tk_pdinterp->result) printf("%s\n",  tk_pdinterp->result);
+        if (tk_pdinterp) printf("%s\n",  Tcl_GetStringResult(tk_pdinterp));
     }
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Pd-cvs mailing list