X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firhooks.c;h=e5b6bcf9a2dabffdf5c3198443524238191d9157;hb=1de3ff1c7f4478924c6348f774608e60b962d055;hp=fdc922808faf291f260be8843c077b76bf6160c2;hpb=b04699046ef5719331e05f5f9bf41d44d3ea7a4e;p=libfirm diff --git a/ir/ir/irhooks.c b/ir/ir/irhooks.c index fdc922808..e5b6bcf9a 100644 --- a/ir/ir/irhooks.c +++ b/ir/ir/irhooks.c @@ -23,9 +23,7 @@ * @author Michael Beck * @version $Id$ */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include "irhooks.h" @@ -33,7 +31,8 @@ hook_entry_t *hooks[hook_last]; /* register a hook */ -void register_hook(hook_type_t hook, hook_entry_t *entry) { +void register_hook(hook_type_t hook, hook_entry_t *entry) +{ /* check if a hook function is specified. It's a union, so no matter which one */ if (! entry->hook._hook_turn_into_id) return; @@ -43,7 +42,8 @@ void register_hook(hook_type_t hook, hook_entry_t *entry) { } /* unregister a hook */ -void unregister_hook(hook_type_t hook, hook_entry_t *entry) { +void unregister_hook(hook_type_t hook, hook_entry_t *entry) +{ hook_entry_t *p; if (hooks[hook] == entry) { @@ -59,10 +59,3 @@ void unregister_hook(hook_type_t hook, hook_entry_t *entry) { entry->next = NULL; } } - -int firm_init_hooks(void) { - /* this strange code assures that both functions are available - in a shared library even if none of them is called. - Meanwhile not needed anymore but ... */ - return (int)register_hook + (int)unregister_hook; -}