diff options
| author | J08nY | 2017-05-01 21:36:33 +0200 |
|---|---|---|
| committer | J08nY | 2017-05-01 21:36:33 +0200 |
| commit | e990fed4bc44fb78d25b898bf2d271d1cb1cb92c (patch) | |
| tree | 1574ed910b6e97336a93fbcea2373f9b02d3a46c /src/math | |
| parent | 67132e9095402696a892f7114a2d477c5b559fdd (diff) | |
| parent | 4b07f578ec1075dafc329929a0323738ee65af20 (diff) | |
| download | ecgen-e990fed4bc44fb78d25b898bf2d271d1cb1cb92c.tar.gz ecgen-e990fed4bc44fb78d25b898bf2d271d1cb1cb92c.tar.zst ecgen-e990fed4bc44fb78d25b898bf2d271d1cb1cb92c.zip | |
Merge branch 'cm'
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; /** |
