tcl-tclreadline/tcl-tclreadline-2.1.0-memus...

19 lines
844 B
Diff

Patch by David Welton for tclreadline >= 2.1.0 to get tclreadline working with threaded
Tcl versions. According to Chris Waters <xtifr@debian.org> this patch is maybe not perfect
but at least it no longer crashes immediately. For further information, please have a look
to Debian bug ID #175192.
--- tclreadline-2.1.0/tclreadline.c 2010-04-06 01:55:35.000000000 +0200
+++ tclreadline-2.1.0/tclreadline.c.memuse 2010-04-06 02:00:30.000000000 +0200
@@ -49,8 +49,8 @@
static const char* tclrl_version_str = TCLRL_VERSION_STR;
static const char* tclrl_patchlevel_str = TCLRL_PATCHLEVEL_STR;
-#define MALLOC(size) Tcl_Alloc((int) size)
-#define FREE(ptr) if (ptr) { Tcl_Free((char*) ptr); ptr = 0; }
+#define MALLOC(size) malloc((int) size)
+#define FREE(ptr) if (ptr) { free((char*) ptr); ptr = 0; }
enum {
_CMD_SET = (1 << 0),