String.st
changeset 809 5eef87c2907b
parent 735 362ce9e28d89
child 833 b5485d985d65
--- a/String.st	Sat Dec 23 01:17:56 1995 +0100
+++ b/String.st	Sat Dec 23 01:35:10 1995 +0100
@@ -1954,25 +1954,21 @@
     OBJ s;
 
     if (__isString(formatString)) {
-#ifdef THISCONTEXT_IN_REGISTER
 	/*
 	 * actually only needed on sparc: since thisContext is
 	 * in a global register, which gets destroyed by printf,
 	 * manually save it here - very stupid ...
 	 */
-	extern OBJ __thisContext__;
-	__thisContext__ = __thisContext;
-#endif
 
 	cp = (char *)_stringVal(self);
 	if (__qClass(self) != String)
 	    cp += __OBJS2BYTES__(_intVal(_ClassInstPtr(__qClass(self))->c_ninstvars));
 
+	__BEGIN_PROTECT_REGISTERS__
+
 	sprintf(buffer, (char *)_stringVal(formatString), cp);
-#ifdef THISCONTEXT_IN_REGISTER
-	__thisContext = __thisContext__;
-	__thisContext__ = nil;
-#endif
+
+	__END_PROTECT_REGISTERS__
 
 	s = _MKSTRING(buffer COMMA_SND);
 	if (s != nil) {
@@ -2198,5 +2194,5 @@
 !String class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/String.st,v 1.56 1995-12-11 17:25:23 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/String.st,v 1.57 1995-12-23 00:34:40 cg Exp $'
 ! !