Staging
v0.5.1
Revision 7efeb75b720e097f087012cf45ecfbe1050b55ad authored by Miss Islington (bot) on 21 November 2019, 01:24:51 UTC, committed by GitHub on 21 November 2019, 01:24:51 UTC

Fixed an incorrect sentence in Doc/c-api/mapping.rst I fell on
while translating the file.

skip issue

Automerge-Triggered-By: @csabella
(cherry picked from commit 06ca2a2be9374ac390e9407685ccce941ab9ffa2)

Co-authored-by: Aveheuzed <a.masson555@ntymail.com>
1 parent ecb2afc
Raw File
strdup.c
/* strdup() replacement (from stdwin, if you must know) */

#include "pgenheaders.h"

char *
strdup(const char *str)
{
    if (str != NULL) {
        char *copy = malloc(strlen(str) + 1);
        if (copy != NULL)
            return strcpy(copy, str);
    }
    return NULL;
}
back to top