From 55c7822fa5f17d86651ecb02dadfbaee006d0202 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Wed, 3 Oct 2001 07:46:16 +0000 Subject: [PATCH] Add floatnum_delete(). svn path=/trunk/yasm/; revision=258 --- libyasm/floatnum.c | 7 +++++++ libyasm/floatnum.h | 1 + src/floatnum.c | 7 +++++++ src/floatnum.h | 1 + 4 files changed, 16 insertions(+) diff --git a/libyasm/floatnum.c b/libyasm/floatnum.c index 6461f341..e0a4fc32 100644 --- a/libyasm/floatnum.c +++ b/libyasm/floatnum.c @@ -475,6 +475,13 @@ floatnum_new(char *str) return flt; } +void +floatnum_delete(floatnum *flt) +{ + BitVector_Destroy(flt->mantissa); + free(flt); +} + int floatnum_get_int(unsigned long *ret_val, const floatnum *flt) { diff --git a/libyasm/floatnum.h b/libyasm/floatnum.h index e40099c4..d30cfa36 100644 --- a/libyasm/floatnum.h +++ b/libyasm/floatnum.h @@ -41,6 +41,7 @@ typedef struct floatnum_s { } floatnum; floatnum *floatnum_new(char *str); +void floatnum_delete(floatnum *flt); /* The get functions return nonzero if flt can't fit into that size format. */ diff --git a/src/floatnum.c b/src/floatnum.c index 6461f341..e0a4fc32 100644 --- a/src/floatnum.c +++ b/src/floatnum.c @@ -475,6 +475,13 @@ floatnum_new(char *str) return flt; } +void +floatnum_delete(floatnum *flt) +{ + BitVector_Destroy(flt->mantissa); + free(flt); +} + int floatnum_get_int(unsigned long *ret_val, const floatnum *flt) { diff --git a/src/floatnum.h b/src/floatnum.h index e40099c4..d30cfa36 100644 --- a/src/floatnum.h +++ b/src/floatnum.h @@ -41,6 +41,7 @@ typedef struct floatnum_s { } floatnum; floatnum *floatnum_new(char *str); +void floatnum_delete(floatnum *flt); /* The get functions return nonzero if flt can't fit into that size format. */