[sword-cvs] sword/src/utilfuns url.cpp,1.1,1.2
sword at www.crosswire.org
sword at www.crosswire.org
Thu Jul 8 12:30:45 MST 2004
Committed by: joachim
Update of /cvs/core/sword/src/utilfuns
In directory www:/tmp/cvs-serv5599/src/utilfuns
Modified Files:
url.cpp
Log Message:
fixed url return values and parameters
Index: url.cpp
===================================================================
RCS file: /cvs/core/sword/src/utilfuns/url.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- url.cpp 6 Jul 2004 20:07:13 -0000 1.1
+++ url.cpp 8 Jul 2004 19:30:42 -0000 1.2
@@ -39,16 +39,16 @@
}
}
-const SWBuf& URL::getProtocol() const {
- return m_protocol;
+const char* const URL::getProtocol() const {
+ return m_protocol.c_str();
}
-const SWBuf& URL::getHostName () const {
- return m_hostname;
+const char* const URL::getHostName () const {
+ return m_hostname.c_str();
}
-const SWBuf& URL::getPath() const {
- return m_path;
+const char* const URL::getPath() const {
+ return m_path.c_str();
}
const std::map< SWBuf, SWBuf >& URL::getParameters() const {
@@ -59,8 +59,8 @@
* Returns the value of an URL parameter. For the URL "http://www.crosswire.org/index.jsp?page=test&user=nobody" the value of the parameter "page" would be "test".
* If the parameter is not set an empty string is returned.
*/
-const SWBuf URL::getParamterValue(const SWBuf& name) {
- return m_parameterMap[ name ];
+const char* const URL::getParamterValue(const char* const name) {
+ return m_parameterMap[ SWBuf(name) ].c_str();
}
More information about the sword-cvs
mailing list