aboutsummaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
authorJ08nY2017-05-01 21:36:33 +0200
committerJ08nY2017-05-01 21:36:33 +0200
commite990fed4bc44fb78d25b898bf2d271d1cb1cb92c (patch)
tree1574ed910b6e97336a93fbcea2373f9b02d3a46c /src/math
parent67132e9095402696a892f7114a2d477c5b559fdd (diff)
parent4b07f578ec1075dafc329929a0323738ee65af20 (diff)
downloadecgen-e990fed4bc44fb78d25b898bf2d271d1cb1cb92c.tar.gz
ecgen-e990fed4bc44fb78d25b898bf2d271d1cb1cb92c.tar.zst
ecgen-e990fed4bc44fb78d25b898bf2d271d1cb1cb92c.zip
Merge branch 'cm'
Diffstat (limited to 'src/math')
-rw-r--r--src/math/arg.c4
-rw-r--r--src/math/types.h7
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;
/**