/
githubmirror
/
cpython
Обзор
Документация
Войти
/
githubmirror
/
cpython
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
3.9
Python/strdup.c
12 строк
251 B
Pablo Galindo
bpo-36623: Clean parser headers and include files (GH-12253)
13 апр 2019, 19:05
Не верифицирован
13 апр 2019, 19:05
f2cf1e3
Код
Авторство
О чём код?
/* strdup() replacement (from stdwin, if you must know) */ char * strdup(const char *str) { if (str != NULL) { char *copy = malloc(strlen(str) + 1); if (copy != NULL) return strcpy(copy, str); } return NULL; }