From a5d800d080a9eb557082042216636ac872eac7ec Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 12 Jun 2004 20:31:03 +0000 Subject: Switch the memory allocation macros from the Halibut ones (mknew/mknewa/resize) to the PuTTY ones (snew/snewn/sresize). snewn and mknewa have their arguments opposite ways round; this may make the change initially painful but in the long term will free me of a nasty context switch every time I move between codebases. Also sresize takes an explicit type operand which is used to cast the return value from realloc, thus enforcing that it must be correct, and arranging that if anyone tries to compile Halibut with a C++ compiler there should be a lot less pain. [originally from svn r4276] --- malloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'malloc.c') diff --git a/malloc.c b/malloc.c index 1635b47..6612fef 100644 --- a/malloc.c +++ b/malloc.c @@ -104,7 +104,7 @@ word *dup_word_list(word *w) { word *head, **eptr = &head; while (w) { - word *newwd = mknew(word); + word *newwd = snew(word); *newwd = *w; /* structure copy */ newwd->text = ustrdup(w->text); if (w->alt) -- cgit v1.1