Staging
v0.5.1
https://github.com/python/cpython
Revision f6ffb4b264ae2ac3e9086abb8c825b195b207bff authored by Benjamin Peterson on 20 January 2014, 05:09:53 UTC, committed by Benjamin Peterson on 20 January 2014, 05:09:53 UTC
1 parent e83ed43
Raw File
Tip revision: f6ffb4b264ae2ac3e9086abb8c825b195b207bff authored by Benjamin Peterson on 20 January 2014, 05:09:53 UTC
document that a new Python thread context is created in ctypes callbacks (closes #6627)
Tip revision: f6ffb4b
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