Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
crystal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chris Müller
crystal
Commits
acac3e7d
Commit
acac3e7d
authored
Oct 28, 2012
by
Chris Müller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib: cry_free is a simple function pointer to free.
=> available for cry_free_funptr arguments.
parent
a626dbca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/standard.h
src/standard.h
+2
-2
tools/graphview.c
tools/graphview.c
+1
-1
No files found.
src/standard.h
View file @
acac3e7d
...
...
@@ -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.
...
...
tools/graphview.c
View file @
acac3e7d
...
...
@@ -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:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment