Staging
v0.5.1
https://github.com/python/cpython
Revision afd43b55124e332fe0a8e495bef551ba7e49a69f authored by Michael W. Hudson on 17 July 2003, 16:26:58 UTC, committed by Michael W. Hudson on 17 July 2003, 16:26:58 UTC
PyOS_InputHook and PyOS_ReadlineFunctionPointer).

The inaccuracies were causing problems in framework builds on Mac OS X.
1 parent 7a6b4f0
Raw File
Tip revision: afd43b55124e332fe0a8e495bef551ba7e49a69f authored by Michael W. Hudson on 17 July 2003, 16:26:58 UTC
Remove inaccurate (and it turns out, entirely superfluous) declarations of
Tip revision: afd43b5
memmove.c

/* A perhaps slow but I hope correct implementation of memmove */

extern char *memcpy(char *, char *, int);

char *
memmove(char *dst, char *src, int n)
{
	char *realdst = dst;
	if (n <= 0)
		return dst;
	if (src >= dst+n || dst >= src+n)
		return memcpy(dst, src, n);
	if (src > dst) {
		while (--n >= 0)
			*dst++ = *src++;
	}
	else if (src < dst) {
		src += n;
		dst += n;
		while (--n >= 0)
			*--dst = *--src;
	}
	return realdst;
}
back to top