mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
use self host strdup
This commit is contained in:
parent
a96e3f5e56
commit
f506721544
@ -97,8 +97,12 @@ PIKA_WEAK int __platform_snprintf(char* buff,
|
||||
return ret;
|
||||
}
|
||||
|
||||
PIKA_WEAK char* __platform_strdup(const char* src){
|
||||
return strdup(src);
|
||||
PIKA_WEAK char* __platform_strdup(const char* src) {
|
||||
char* dst = (char*)__platform_malloc(strlen(src) + 1);
|
||||
if (dst) {
|
||||
strcpy(dst, src);
|
||||
}
|
||||
return dst;
|
||||
}
|
||||
|
||||
PIKA_WEAK size_t __platform_tick_from_millisecond(size_t ms) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user