In makedef.pl, change readvar() to add items to a passed-in hash reference.
authorNicholas Clark <nick@ccl4.org>
Tue, 26 Jul 2011 12:37:53 +0000 (14:37 +0200)
committerNicholas Clark <nick@ccl4.org>
Mon, 1 Aug 2011 09:53:55 +0000 (11:53 +0200)
commit44c1781396fd9d1017d6ac6eb3a1f30b9d57cfcc
tree74a0b759fcc2768864583619c4f709dff310d501
parent9db1545aca9c10c4b07c997070af624ab9d2e3df
In makedef.pl, change readvar() to add items to a passed-in hash reference.

Previously, readvar() returned a list of symbols, extracting the names of
the variables declared there, then transforming them either via a passed in
function, or prepending 'PL_'. The list was then either added to %skip, or
added to %export by try_symbols(), which had a kludge to normalise the
previous transformation to 'PL_'.

Instead, passing a reference to the target hash into readvar() allows that
kludge to be removed, considerably simplifying try_symbols().
makedef.pl