Commit acac3e7d authored by Chris Müller's avatar Chris Müller

lib: cry_free is a simple function pointer to free.

=> available for cry_free_funptr arguments.
parent a626dbca
......@@ -81,10 +81,10 @@ crydefine__tuple(float, tuple_float);
#define cry_realloc(Type, Pointer, num) realloc(Pointer, sizeof(Pointer) * num)
/**
* Crystal free macro for deallocating memory (equivalent to free(Pointer))
* Crystal renaming for deallocating memory (equivalent to free(Pointer))
* @param Pointer The address of the freeing memory block
*/
#define cry_free(Pointer) free(Pointer)
static void (*cry_free)(pointer data) = free;
/**
* Convenient casting operator for cleaner code similar to c++ static_cast in its appearance.
......
......@@ -38,7 +38,7 @@ file_parse_red_black_tree(FILE* file)
if( (node = rb_tree_remove(tree, &tmp)) == 0)
fprintf(stderr, "Value %d is not in tree.\n", tmp);
else
rb_node_free(node, free, 0);
rb_node_free(node, cry_free, 0);
break;
default:
......
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