use garbage collection
commit4aa65c31aaa6a42d7e8d7f0f88310193defa142c
authorJim Meyering <meyering@redhat.com>
Wed, 22 Dec 2010 16:25:19 +0000 (22 17:25 +0100)
committerJim Meyering <meyering@redhat.com>
Fri, 14 Jan 2011 21:09:39 +0000 (14 22:09 +0100)
tree53b7ca94bdf156a9bfb07f6a348787236b8b91ad
parent0b84ead98cc260102cb4c1337ee3dad3224af05b
use garbage collection

Add -lgc when linking.
* gc-wrap.h: New file, to map malloc, realloc, free,
etc. to GC'd equivalents.
* iwh.h: Include it.
* template.c: Include it.
* Makefile.am (iwhd_LDADD): Add -lgc and -lpthread.
* t/Makefile.am (parser_LDADD): Likewise.
* Makefile.am (iwhd_SOURCES): Add gc-wrap.h.
(TESTS): Move the simpler parser-test to precede all others.
* iwhd.spec.in (BuildRequires): Require gc-devel.
* qparser.y (free_value): Remove function.
* meta.cpp, replica.c: Remove all uses.
* query.h: Remove declaration.
* rest.c (main): Call GC_INIT.
* qparser.y (main) [PARSER_UNIT_TEST]: Likewise.
* mpipe.c: Include unistd.h here, ...
* mpipe.h: ...not here.
Don't include the following, either: fcntl.h, stdlib.h, string.h,
strings.h, sys/stat.h.  They were not used, and got in the way
of gc-wrap's redefinitions.
13 files changed:
Makefile.am
gc-wrap.h [new file with mode: 0644]
iwh.h
iwhd.spec.in
meta.cpp
mpipe.c
mpipe.h
qparser.y
query.h
replica.c
rest.c
t/Makefile.am
template.c