Staging
v0.5.1
https://github.com/python/cpython
Revision b9999158545f3bc089b926086daa666b8e4c7caa authored by Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) on 20 November 2016, 21:19:36 UTC, committed by Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) on 20 November 2016, 21:19:36 UTC
1 parent d54d327
Raw File
Tip revision: b9999158545f3bc089b926086daa666b8e4c7caa authored by Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) on 20 November 2016, 21:19:36 UTC
Rename the new --with-optimiations flag to --enable-optimizations.
Tip revision: b999915
strdup.c
/* 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;
}
back to top