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