Staging
v0.8.1
https://github.com/python/cpython
Revision 86d8d3520d674bf66000e2930adf6df53f3fb0fa authored by Collin Winter on 10 March 2007, 03:31:44 UTC, committed by Collin Winter on 10 March 2007, 03:31:44 UTC
1 parent 8bf469d
Raw File
Tip revision: 86d8d3520d674bf66000e2930adf6df53f3fb0fa authored by Collin Winter on 10 March 2007, 03:31:44 UTC
Bug #1531963: Make SocketServer.TCPServer's server_address always be equal to calling getsockname() on the server's socket. Fixed by patch #1545011.
Tip revision: 86d8d35
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