Staging
v0.5.1
https://github.com/python/cpython
Revision f0a49708eb1a00eca83dbe26eb47e8506b80225f authored by Amaury Forgeot d'Arc on 01 April 2008, 22:52:48 UTC, committed by Amaury Forgeot d'Arc on 01 April 2008, 22:52:48 UTC
it registers the same codec on each iteration.
Do it only once at load time.
1 parent ce6f6c1
Raw File
Tip revision: f0a49708eb1a00eca83dbe26eb47e8506b80225f authored by Amaury Forgeot d'Arc on 01 April 2008, 22:52:48 UTC
Newly enabled test appears to leak:
Tip revision: f0a4970
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