]> granicus.if.org Git - postgresql/commit
Clean up temporary-memory management during ispell dictionary loading.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 6 Oct 2010 19:15:15 +0000 (15:15 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 6 Oct 2010 19:15:15 +0000 (15:15 -0400)
commit9b910def24e85c1c4ff993eae0fe511271fc8682
tree3381e0cd65a0927b306cd887ef3b4063108b705e
parentbdf45797abe53a9e2bebd54e5475591e468a0ad1
Clean up temporary-memory management during ispell dictionary loading.

Add explicit initialization and cleanup functions to spell.c, and keep
all working state in the already-existing ISpellDict struct.  This lets us
get rid of a static variable along with some extremely shaky assumptions
about usage of child memory contexts.

This commit is just code beautification and has no impact on functionality
or performance, but it opens the way to a less-grotty implementation of
Pavel's memory-saving hack, which will follow shortly.
src/backend/tsearch/dict_ispell.c
src/backend/tsearch/spell.c
src/include/tsearch/dicts/spell.h