[sword-cvs] sword/src/utilfuns url.cpp,1.9,1.10

sword at www.crosswire.org sword at www.crosswire.org
Tue Jul 20 15:48:36 MST 2004


Committed by: scribe

Update of /cvs/core/sword/src/utilfuns
In directory www:/tmp/cvs-serv1141/src/utilfuns

Modified Files:
	url.cpp 
Log Message:
change encode/decode to return temporaries.


Index: url.cpp
===================================================================
RCS file: /cvs/core/sword/src/utilfuns/url.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- url.cpp	20 Jul 2004 20:42:07 -0000	1.9
+++ url.cpp	20 Jul 2004 22:48:33 -0000	1.10
@@ -198,7 +198,7 @@
 	}
 }
 
-const char* URL::encode(const char *urlText) {
+const SWBuf URL::encode(const char *urlText) {
 	static SWBuf url;
 	url = urlText;
 	
@@ -224,10 +224,10 @@
 	}
 
 	url = buf;
-	return url.c_str();
+	return url;
 }
 
-const char* URL::decode(const char *encoded) {
+const SWBuf URL::decode(const char *encoded) {
 	static SWBuf text;
 	text = encoded;	
 
@@ -264,7 +264,7 @@
 	if (decoded.length()) {
 		text = decoded;
 	}
-	return text.c_str();
+	return text;
 }
 
 SWORD_NAMESPACE_END



More information about the sword-cvs mailing list