From 6c580ba0f03641cafc26190f092d931c14ebf214 Mon Sep 17 00:00:00 2001 From: Cedric Bastoul Date: Wed, 14 Sep 2011 18:44:02 +0200 Subject: [PATCH] Add openscop_int_p associated free --- include/openscop/int.h | 1 + source/int.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/include/openscop/int.h b/include/openscop/int.h index 50f808a..63231aa 100644 --- a/include/openscop/int.h +++ b/include/openscop/int.h @@ -88,6 +88,7 @@ void openscop_int_set_si(int, void *, int, int); int openscop_int_get_si(int, void *, int); void openscop_int_init_set_si(int, void *, int, int); void openscop_int_clear(int, void *, int); +void openscop_int_free(int, void *, int); void openscop_int_print(FILE *, int, void *, int); void openscop_int_sprint(char *, int, void *, int); void openscop_int_sread(char *, int, void *, int); diff --git a/source/int.c b/source/int.c index 4e1cace..6536cad 100644 --- a/source/int.c +++ b/source/int.c @@ -309,6 +309,14 @@ void openscop_int_clear(int precision, void * value_base, int value_offset) { } +void openscop_int_free(int precision, void * value_base, int value_offset) { + void * value = openscop_int_address(precision, value_base, value_offset); + + openscop_int_clear(precision, value_base, value_offset); + free(value); +} + + /** * openscop_int_print function: * this function displays an integer value into a file (file, possibly stdout). -- 2.11.4.GIT