Changeset 102175 in vbox for trunk/src/libs
- Timestamp:
- Nov 21, 2023 8:29:54 AM (15 months ago)
- Location:
- trunk/src/libs/xpcom18a4
- Files:
-
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/Makefile.kmk
r102174 r102175 484 484 nsprpub/lib/libc/src/strlen.c \ 485 485 nsprpub/lib/libc/src/strcpy.c \ 486 nsprpub/lib/libc/src/strdup.c \487 486 nsprpub/lib/libc/src/strcmp.c \ 488 487 nsprpub/lib/libc/src/strccmp.c -
trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/transmngr/src/tmTransactionService.cpp
r1 r102175 36 36 * ***** END LICENSE BLOCK ***** */ 37 37 38 #include <iprt/string.h> 39 38 40 #include "nsCOMPtr.h" 39 41 #include "nsIServiceManager.h" … … 56 58 tm_waiting_msg::~tm_waiting_msg() { 57 59 if (domainName) 58 PL_strfree(domainName);60 RTStrFree(domainName); 59 61 } 60 62 … … 69 71 tm_queue_mapping::~tm_queue_mapping() { 70 72 if (domainName) 71 PL_strfree(domainName);73 RTStrFree(domainName); 72 74 if (joinedQueueName) 73 PL_strfree(joinedQueueName);75 RTStrFree(joinedQueueName); 74 76 } 75 77 -
trunk/src/libs/xpcom18a4/nsprpub/lib/libc/include/plstr.h
r102174 r102175 136 136 137 137 /* 138 * PL_strdup139 *140 * Returns a pointer to a malloc'd extent of memory containing a duplicate141 * of the argument string. The size of the allocated extent is one greater142 * than the length of the argument string, because of the terminator. A143 * null argument, like a zero-length argument, will result in a pointer to144 * a one-byte extent containing the null value. This routine returns null145 * upon malloc failure.146 */147 148 PR_EXTERN(char *)149 PL_strdup(const char *s);150 151 /*152 * PL_strfree153 *154 * Free memory allocated by PL_strdup155 */156 157 PR_EXTERN(void)158 PL_strfree(char *s);159 160 /*161 * PL_strndup162 *163 * Returns a pointer to a malloc'd extent of memory containing a duplicate164 * of the argument string, up to the maximum specified. If the argument165 * string has a length greater than the value of the specified maximum, the166 * return value will be a pointer to an extent of memory of length one167 * greater than the maximum specified. A null string, a zero-length string,168 * or a zero maximum will all result in a pointer to a one-byte extent169 * containing the null value. This routine returns null upon malloc failure.170 */171 172 PR_EXTERN(char *)173 PL_strndup(const char *s, PRUint32 max);174 175 /*176 138 * PL_strcmp 177 139 * -
trunk/src/libs/xpcom18a4/xpcom/base/nsTraceRefcntImpl.cpp
r101998 r102175 37 37 * ***** END LICENSE BLOCK ***** */ 38 38 39 #include <iprt/string.h> 40 39 41 #include "nsTraceRefcntImpl.h" 40 42 #include "nscore.h" … … 234 236 BloatEntry(const char* className, PRUint32 classSize) 235 237 : mClassSize(classSize) { 236 mClassName = PL_strdup(className);238 mClassName = RTStrDup(className); 237 239 Clear(&mNewStats); 238 240 Clear(&mAllStats); … … 241 243 242 244 ~BloatEntry() { 243 PL_strfree(mClassName);245 RTStrFree(mClassName); 244 246 } 245 247 -
trunk/src/libs/xpcom18a4/xpcom/components/nsComponentManager.cpp
r101989 r102175 88 88 89 89 #include <iprt/assert.h> 90 #include <iprt/string.h> 90 91 #include <VBox/log.h> 91 92 … … 767 768 768 769 mNLoaderData = NS_COMPONENT_TYPE_NATIVE; 769 mLoaderData[mNLoaderData].type = PL_strdup(nativeComponentType);770 mLoaderData[mNLoaderData].type = RTStrDup(nativeComponentType); 770 771 mLoaderData[mNLoaderData].loader = mNativeComponentLoader; 771 772 NS_ADDREF(mLoaderData[mNLoaderData].loader); … … 780 781 } 781 782 782 mLoaderData[mNLoaderData].type = PL_strdup(staticComponentType);783 mLoaderData[mNLoaderData].type = RTStrDup(staticComponentType); 783 784 mLoaderData[mNLoaderData].loader = mStaticComponentLoader; 784 785 NS_ADDREF(mLoaderData[mNLoaderData].loader); … … 874 875 for (i=0; i < mNLoaderData; i++) { 875 876 NS_IF_RELEASE(mLoaderData[i].loader); 876 PL_strfree((char *)mLoaderData[i].type);877 RTStrFree((char *)mLoaderData[i].type); 877 878 } 878 879 PR_Free(mLoaderData); … … 949 950 AutoRegEntry::~AutoRegEntry() 950 951 { 951 if (mName) PL_strfree(mName);952 if (mData) PL_strfree(mData);952 if (mName) RTStrFree(mName); 953 if (mData) RTStrFree(mData); 953 954 } 954 955 … … 963 964 { 964 965 if (mData) 965 PL_strfree(mData);966 RTStrFree(mData); 966 967 967 968 if (!data) { … … 970 971 } 971 972 972 mData = PL_strdup(data);973 mData = RTStrDup(data); 973 974 } 974 975 … … 2427 2428 2428 2429 if (!aSpec) { 2429 *aRegistryName = PL_strdup("");2430 *aRegistryName = RTStrDup(""); 2430 2431 return NS_OK; 2431 2432 } … … 2844 2845 2845 2846 typeIndex = mNLoaderData; 2846 mLoaderData[typeIndex].type = PL_strdup(typeStr);2847 mLoaderData[typeIndex].type = RTStrDup(typeStr); 2847 2848 if (!mLoaderData[typeIndex].type) { 2848 2849 // mmh! no memory. return failure. -
trunk/src/libs/xpcom18a4/xpcom/ds/nsCRT.h
r1 r102175 37 37 #ifndef nsCRT_h___ 38 38 #define nsCRT_h___ 39 40 #include <iprt/string.h> 39 41 40 42 #include <stdlib.h> … … 170 172 171 173 static char* strdup(const char* str) { 172 return PL_strdup(str);174 return RTStrDup(str); 173 175 } 174 176 175 177 static char* strndup(const char* str, PRUint32 len) { 176 return PL_strndup(str, len);178 return RTStrDupN(str, len); 177 179 } 178 180 179 181 static void free(char* str) { 180 PL_strfree(str);182 RTStrFree(str); 181 183 } 182 184 -
trunk/src/libs/xpcom18a4/xpcom/proxy/src/nsProxyEvent.cpp
r101967 r102175 49 49 */ 50 50 51 #include <iprt/string.h> 52 51 53 #include "nsProxyEvent.h" 52 54 #include "nsProxyEventPrivate.h" … … 177 179 case nsXPTType::T_CHAR_STR: 178 180 mParameterList[i].val.p = 179 PL_strdup((const char *)ptr);181 RTStrDup((const char *)ptr); 180 182 break; 181 183 case nsXPTType::T_WCHAR_STR: … … 207 209 case nsXPTType::T_CHAR_STR: 208 210 case nsXPTType::T_WCHAR_STR: 209 PL_strfree((char*) ptr);211 RTStrFree((char*) ptr); 210 212 break; 211 213 case nsXPTType::T_DOMSTRING:
Note:
See TracChangeset
for help on using the changeset viewer.