symbian-qemu-0.9.1-12/python-2.6.1/Python/strdup.c
author William Roberts <williamr@symbian.org>
Tue, 13 Apr 2010 18:30:00 +0100
branchCompilerCompatibility
changeset 59 62a56fb37080
parent 1 2fb8b9db1c86
permissions -rw-r--r--
Update hal.mmp to cope with change in kernelhwsrv that exports hal_int.h to epoc32\include\platform\kernel

/* strdup() replacement (from stdwin, if you must know) */

#include "pgenheaders.h"

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