diff options
Diffstat (limited to 'src/math')
| -rw-r--r-- | src/math/arg.c | 4 | ||||
| -rw-r--r-- | src/math/types.h | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/math/arg.c b/src/math/arg.c index e313adb..d2eba9b 100644 --- a/src/math/arg.c +++ b/src/math/arg.c @@ -16,6 +16,10 @@ arg_t *arg_new(void) { void arg_free(arg_t **arg) { if (*arg) { + if ((*arg)->mallocd) { + pari_free((*arg)->mallocd); + (*arg)->mallocd = NULL; + } pari_free(*arg); *arg = NULL; } diff --git a/src/math/types.h b/src/math/types.h index 96103e5..64b9c99 100644 --- a/src/math/types.h +++ b/src/math/types.h @@ -15,7 +15,11 @@ /** * @brief */ -typedef struct { GEN seed; } seed_t; +typedef struct seed_t { + char *raw; + size_t raw_len; + GEN seed; +} seed_t; /** * @brief A point type. @@ -76,6 +80,7 @@ typedef enum { typedef struct { const void *args; size_t nargs; + void *mallocd; } arg_t; /** |
