Added nsCRT::free methods.

This commit is contained in:
warren%netscape.com 1999-04-22 04:25:17 +00:00
parent f55fcb0c57
commit 51b7658a46
2 changed files with 16 additions and 0 deletions

View File

@ -129,6 +129,10 @@ public:
return PL_strdup(str);
}
static void free(char* str) {
PL_strfree(str);
}
/**
How to use this fancy (thread-safe) version of strtok:
@ -179,6 +183,10 @@ public:
// free the memory
static PRUnichar* strdup(const PRUnichar* str);
static void free(PRUnichar* str) {
delete[] str;
}
/// Compute a hashcode for a ucs2 string
static PRUint32 HashValue(const PRUnichar* s1);

View File

@ -129,6 +129,10 @@ public:
return PL_strdup(str);
}
static void free(char* str) {
PL_strfree(str);
}
/**
How to use this fancy (thread-safe) version of strtok:
@ -179,6 +183,10 @@ public:
// free the memory
static PRUnichar* strdup(const PRUnichar* str);
static void free(PRUnichar* str) {
delete[] str;
}
/// Compute a hashcode for a ucs2 string
static PRUint32 HashValue(const PRUnichar* s1);