summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2004-06-12 20:31:03 +0000
committerSimon Tatham <anakin@pobox.com>2004-06-12 20:31:03 +0000
commita5d800d080a9eb557082042216636ac872eac7ec (patch)
treebbc892a5a4e1da173dbbbe4358160aec96b4161d /malloc.c
parent3ae295ca676ac0db275ad2cc1945fa0eca4a19bd (diff)
downloadhalibut-a5d800d080a9eb557082042216636ac872eac7ec.zip
halibut-a5d800d080a9eb557082042216636ac872eac7ec.tar.gz
halibut-a5d800d080a9eb557082042216636ac872eac7ec.tar.bz2
halibut-a5d800d080a9eb557082042216636ac872eac7ec.tar.xz
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]
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c2
1 files changed, 1 insertions, 1 deletions
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)