Hello *,
A deprecated interp->result has finally disappeared in tcl-8.6, one has to
use Tcl_GetStringResult(interp) instead. gcl-2.6.10 (as well as all
earlier versions) don't compile with tcl-8.6 or later. The attached patch
to tkMain.c fixes the problem (I've already sent it to the list in March
2013, but it is not yet included).
I've committed gcl-2.6.10 ebuild to Gentoo, largely based on the fedora
srpm by Jerry James (thanks!). But this patch is also absent in fedora.
Does fedora use a very old tcl?
At the moment, gcl is still masked in Gentoo. I hope to get it unmasked
soon.
Andrey
--- tkMain.c~ 2010-01-01 02:40:37.000000000 +0600
+++ tkMain.c 2013-03-14 13:22:51.000000000 +0700
@@ -208,3 +208,3 @@
!= TCL_OK) {
- fprintf(stderr, "%s\n", interp->result);
+ fprintf(stderr, "%s\n", Tcl_GetStringResult(interp));
exit(1);
@@ -292,3 +292,3 @@
if (Tcl_AppInit(interp) != TCL_OK) {
- fprintf(stderr, "Tcl_AppInit failed: %s\n", interp->result);
+ fprintf(stderr, "Tcl_AppInit failed: %s\n",
Tcl_GetStringResult(interp));
}
@@ -302,3 +302,3 @@
if (code != TCL_OK) {
- fprintf(stderr, "%s\n", interp->result);
+ fprintf(stderr, "%s\n", Tcl_GetStringResult(interp));
}
@@ -332,3 +332,3 @@
if (fullName == NULL) {
- fprintf(stderr, "%s\n", interp->result);
+ fprintf(stderr, "%s\n", Tcl_GetStringResult(interp));
} else {
@@ -338,3 +338,3 @@
if (code != TCL_OK) {
- fprintf(stderr, "%s\n", interp->result);
+ fprintf(stderr, "%s\n", Tcl_GetStringResult(interp));
}
@@ -373,3 +373,3 @@
if (msg == NULL) {
- msg = interp->result;
+ msg = Tcl_GetStringResult(interp);
}
@@ -498,3 +498,3 @@
char buf[4];
- char *p = buf;
+ char *p = buf, *string;
/*header */
@@ -503,5 +503,4 @@
/* end header */
- if(sock_write_str2(dsfd, m_reply, buf, 4 ,
- interp->result, strlen(interp->result))
- < 0)
+ string = Tcl_GetStringResult(interp);
+ if(sock_write_str2(dsfd, m_reply, buf, 4, string, strlen(string))
< 0)
{ /* what do we want to do if the write failed */}
_______________________________________________
Gcl-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gcl-devel