Browse Source

mozilla 24: nsCAutoString replaced with nsAutoString

toddw 11 years ago
parent
commit
5a59a56d6f

+ 3 - 3
xpcom/src/ErrorUtils.cpp

@@ -67,7 +67,7 @@ static void _PanicErrorWrite(const char *msg)
 // Called when our "normal" error logger fails.
 // Called when our "normal" error logger fails.
 static void HandleLogError(const char *pszMessageText)
 static void HandleLogError(const char *pszMessageText)
 {
 {
-	nsCAutoString streamout;
+	nsAutoCString streamout;
 
 
 	_PanicErrorWrite("Failed to log an error record");
 	_PanicErrorWrite("Failed to log an error record");
 	if (PyXPCOM_FormatCurrentException(streamout))
 	if (PyXPCOM_FormatCurrentException(streamout))
@@ -130,7 +130,7 @@ void DoLogMessage(const char *methodName, const char *pszMessageText)
 // We will execute:
 // We will execute:
 //  import logging
 //  import logging
 //  logging.getLogger('xpcom').{warning/error/etc}("%s", {msg_text})
 //  logging.getLogger('xpcom').{warning/error/etc}("%s", {msg_text})
-	nsCAutoString c("import logging\nlogging.getLogger('xpcom').");
+	nsAutoCString c("import logging\nlogging.getLogger('xpcom').");
 	c += methodName;
 	c += methodName;
 	c += "('%s', ";
 	c += "('%s', ";
 	// Pull a trick to ensure a valid string - use Python repr!
 	// Pull a trick to ensure a valid string - use Python repr!
@@ -241,7 +241,7 @@ void PyXPCOM_LogError(const char *fmt, ...)
 	char buff[512];
 	char buff[512];
 	PR_vsnprintf(buff, sizeof(buff), fmt, marker);
 	PR_vsnprintf(buff, sizeof(buff), fmt, marker);
 	// If we have a Python exception, also log that:
 	// If we have a Python exception, also log that:
-	nsCAutoString streamout(buff);
+	nsAutoCString streamout(buff);
 	PyXPCOM_FormatCurrentException(streamout);
 	PyXPCOM_FormatCurrentException(streamout);
 	LogMessage(LOGGER_ERROR, streamout);
 	LogMessage(LOGGER_ERROR, streamout);
 }
 }

+ 1 - 1
xpcom/src/VariantUtils.cpp

@@ -895,7 +895,7 @@ PyObject_FromVariant( Py_nsISupports *parent, nsIVariant *v)
 		case nsIDataType::VTYPE_CHAR_STR:
 		case nsIDataType::VTYPE_CHAR_STR:
 		case nsIDataType::VTYPE_STRING_SIZE_IS:
 		case nsIDataType::VTYPE_STRING_SIZE_IS:
 		case nsIDataType::VTYPE_CSTRING: {
 		case nsIDataType::VTYPE_CSTRING: {
-			nsCAutoString s;
+			nsAutoCString s;
 			if (NS_FAILED(nr=v->GetAsACString(s))) goto done;
 			if (NS_FAILED(nr=v->GetAsACString(s))) goto done;
 			ret = PyString_FromNSString(s);
 			ret = PyString_FromNSString(s);
 			break;
 			break;

+ 1 - 1
xpcom/src/dllmain.cpp

@@ -131,7 +131,7 @@ void AddStandardPaths()
 	Py_XDECREF(newStr);
 	Py_XDECREF(newStr);
 	// And now try and get Python to process this directory as a "site dir" 
 	// And now try and get Python to process this directory as a "site dir" 
 	// - ie, look for .pth files, etc
 	// - ie, look for .pth files, etc
-	nsCAutoString cmdBuf(NS_LITERAL_CSTRING("import site;site.addsitedir(r'"));
+	nsAutoCString cmdBuf(NS_LITERAL_CSTRING("import site;site.addsitedir(r'"));
 	cmdBuf.Append(pathCBuf);
 	cmdBuf.Append(pathCBuf);
 	cmdBuf.Append(NS_LITERAL_CSTRING("')\n"));
 	cmdBuf.Append(NS_LITERAL_CSTRING("')\n"));
 	if (0 != PyRun_SimpleString((char *)cmdBuf.get())) {
 	if (0 != PyRun_SimpleString((char *)cmdBuf.get())) {

+ 1 - 1
xpcom/src/loader/pyloader.cpp

@@ -126,7 +126,7 @@ nsPythonModuleLoader::LoadModule(mozilla::FileLocation& aFileLocation)
     #endif
     #endif
 
 
     if (PR_LOG_TEST(nsPythonModuleLoaderLog, PR_LOG_DEBUG)) {
     if (PR_LOG_TEST(nsPythonModuleLoaderLog, PR_LOG_DEBUG)) {
-        nsCAutoString filePath;
+        nsAutoCString filePath;
         file->GetNativePath(filePath);
         file->GetNativePath(filePath);
         LOG(PR_LOG_DEBUG,
         LOG(PR_LOG_DEBUG,
             ("nsPythonModuleLoader::LoadModule(\"%s\")", filePath.get()));
             ("nsPythonModuleLoader::LoadModule(\"%s\")", filePath.get()));