зеркало из https://github.com/mozilla/gecko-dev.git
Added nsCRT::free methods.
This commit is contained in:
Родитель
f55fcb0c57
Коммит
51b7658a46
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче