Staging
v0.5.1
https://github.com/python/cpython
Revision dff7770b7f19b3cfdcbcbc4dc205f53ef6170c2d authored by Jack Jansen on 05 September 2001, 22:07:52 UTC, committed by Jack Jansen on 05 September 2001, 22:07:52 UTC
fullblown drag and drop application. To my surprise it is starting
to work already: Python actually executes a script dropped on it.

To be done:
- Make sure this still works in MacPython
- Don't lose argv[0] in the process
- Applet support
1 parent b30e106
Raw File
Tip revision: dff7770b7f19b3cfdcbcbc4dc205f53ef6170c2d authored by Jack Jansen on 05 September 2001, 22:07:52 UTC
Changes to make these work under OSX as the main program for a
Tip revision: dff7770
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