diff --git a/src/Kaleidoscope.cpp b/src/Kaleidoscope.cpp index 525dfe44..33fd00be 100644 --- a/src/Kaleidoscope.cpp +++ b/src/Kaleidoscope.cpp @@ -134,3 +134,13 @@ Kaleidoscope_::focusHook(const char *command) { } Kaleidoscope_ Kaleidoscope; + +/* Deprecated functions */ + +void event_handler_hook_use(Kaleidoscope_::eventHandlerHook hook) { + Kaleidoscope.useEventHandlerHook(hook); +} + +void loop_hook_use(Kaleidoscope_::loopHook hook) { + Kaleidoscope.useLoopHook(hook); +} diff --git a/src/Kaleidoscope.h b/src/Kaleidoscope.h index 25846149..85ae047c 100644 --- a/src/Kaleidoscope.h +++ b/src/Kaleidoscope.h @@ -121,10 +121,5 @@ extern Kaleidoscope_ Kaleidoscope; /* -- DEPRECATED aliases; remove them when there are no more users. -- */ -#define event_handler_hook_use(hook) Kaleidoscope.useEventHandlerHook(hook); -#define event_handler_hook_append(hook) Kaleidoscope.appendEventHandlerHook(hook) -#define event_handler_hook_replace(oldHook, newHook) Kaleidoscope.replaceEventHandlerHook(oldHook, newHook) - -#define loop_hook_use(hook) Kaleidoscope.useLoopHook(hook) -#define loop_hook_append(hook) Kaleidoscope.appendLoopHook(hook) -#define loop_hook_replace(oldHook, newHook) Kaleidoscope.replaceLoopHook(oldHook, newHook) +void event_handler_hook_use(Kaleidoscope_::eventHandlerHook hook) __attribute__((deprecated)); +void loop_hook_use(Kaleidoscope_::loopHook hook) __attribute__((deprecated));