Commit 1ed2e892 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Use the opaque pointer type hook_entry_t* instead of void*.

parent e4190f10
......@@ -316,6 +316,8 @@ typedef enum {
align_non_aligned, /**< The entity is not aligned. */
} ir_align;
typedef struct hook_entry hook_entry_t;
#include "end.h"
#endif
......@@ -369,7 +369,7 @@ typedef void (dump_node_info_cb_t)(void *data, FILE *out, const ir_node *n);
*
* @note This functionality is only available, if Firm hooks are enabled.
*/
FIRM_API void *dump_add_node_info_callback(dump_node_info_cb_t *cb, void *data);
FIRM_API hook_entry_t *dump_add_node_info_callback(dump_node_info_cb_t *cb, void *data);
/**
* Remove a previously added info dumper callback.
......@@ -377,7 +377,7 @@ FIRM_API void *dump_add_node_info_callback(dump_node_info_cb_t *cb, void *data);
* @param handle the callback handle returned from
* dump_add_node_info_callback()
*/
FIRM_API void dump_remove_node_info_callback(void *handle);
FIRM_API void dump_remove_node_info_callback(hook_entry_t *handle);
/*@}*/
......
......@@ -25,7 +25,7 @@
struct ir_heights_t {
ir_nodemap data;
unsigned visited;
void *dump_handle;
hook_entry_t *dump_handle;
struct obstack obst;
};
......
......@@ -953,7 +953,7 @@ static void dump_node_vcgattr(FILE *F, const ir_node *node, const ir_node *local
}
}
void *dump_add_node_info_callback(dump_node_info_cb_t *cb, void *data)
hook_entry_t *dump_add_node_info_callback(dump_node_info_cb_t *cb, void *data)
{
hook_entry_t *info = XMALLOCZ(hook_entry_t);
......@@ -964,7 +964,7 @@ void *dump_add_node_info_callback(dump_node_info_cb_t *cb, void *data)
return info;
}
void dump_remove_node_info_callback(void *handle)
void dump_remove_node_info_callback(hook_entry_t *handle)
{
hook_entry_t *info = (hook_entry_t*)handle;
unregister_hook(hook_node_info, info);
......
......@@ -68,7 +68,7 @@ typedef void (generic_func)(void);
/**
* a hook entry
*/
typedef struct hook_entry {
struct hook_entry {
/** A union of all possible hook types. */
union {
/** This hook is called, after a new ir_op was created. */
......@@ -161,7 +161,7 @@ typedef struct hook_entry {
/** needed for chaining */
struct hook_entry *next;
} hook_entry_t;
};
/**
* possible hooks
......
......@@ -44,7 +44,7 @@ typedef struct block_assoc_t {
static set *profile = NULL;
/* Hook for vcg output. */
static void *hook;
static hook_entry_t *hook;
/* The debug module handle. */
DEBUG_ONLY(static firm_dbg_module_t *dbg;)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment