Class around PixMap objects that allows more python-like access. By Joe Strout.
[python/dscho.git] / Python / strdup.c
blob9168b4fe5d3bdb29ff578bdf62cf0f9f84919669
1 /* strdup() replacement (from stdwin, if you must know) */
3 #include "pgenheaders.h"
5 char *
6 strdup(str)
7 const char *str;
9 if (str != NULL) {
10 register char *copy = malloc(strlen(str) + 1);
11 if (copy != NULL)
12 return strcpy(copy, str);
14 return NULL;