[cvslog] (2003-04-19 06:53:39 UTC) Module eggdrop1.7: Change committed

cvslog cvs at tsss.org
Sat Apr 19 00:53:39 CST 2003


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.7
Commit time: 2003-04-19 06:53:39 UTC
Commited by: stdarg <stdarg at techmonkeys.org>

Modified files:
     modules/tclscript/tclscript.c

Log message:

* tcl: check for read-only status on linked vars

---------------------- diff included ----------------------
Index: eggdrop1.7/modules/tclscript/tclscript.c
diff -u eggdrop1.7/modules/tclscript/tclscript.c:1.33 eggdrop1.7/modules/tclscript/tclscript.c:1.34
--- eggdrop1.7/modules/tclscript/tclscript.c:1.33	Tue Apr 15 13:05:01 2003
+++ eggdrop1.7/modules/tclscript/tclscript.c	Sat Apr 19 01:53:29 2003
@@ -132,6 +132,8 @@
 	else if (flags & TCL_TRACE_WRITES) {
 		Tcl_Obj *obj;
 
+		if (linked_var->type & SCRIPT_READONLY) return("read only variable");
+
 		obj = Tcl_GetVar2Ex(irp, name1, name2, 0);
 		if (!obj) return("Error setting variable");
 
@@ -142,6 +144,7 @@
 		/* If someone unsets a variable, we'll just reset it. */
 		if (flags & TCL_TRACE_DESTROYED) my_link_var(NULL, linked_var);
 		else set_linked_var(linked_var, NULL);
+		return("read only variable");
 	}
 	return(NULL);
 }
@@ -421,7 +424,7 @@
 	var->len = -1;
 	var->value = NULL;
 
-	switch (type) {
+	switch (type & SCRIPT_TYPE_MASK) {
 		case SCRIPT_STRING: {
 			char *str;
 			int len;
----------------------- End of diff -----------------------


More information about the Changes mailing list