Back to index

python3.2  3.2.2
strdup.c File Reference
#include "pgenheaders.h"

Go to the source code of this file.


char * strdup (const char *str)

Function Documentation

char* strdup ( const char *  str)

Definition at line 6 of file strdup.c.

       if (str != NULL) {
              register char *copy = malloc(strlen(str) + 1);
              if (copy != NULL)
                     return strcpy(copy, str);
       return NULL;

Here is the call graph for this function:

Here is the caller graph for this function: