@@ -133,6 +133,8 @@ typedef enum
133133 GR_METHOD_CTX_SET_IS_FIELD ,
134134 GR_METHOD_CTX_SET_GEN_NAME ,
135135 GR_METHOD_CTX_SET_GEN_NAMES ,
136+ GR_METHOD_CTX_NGENS ,
137+ GR_METHOD_CTX_GEN_NAME ,
136138
137139 GR_METHOD_INIT ,
138140 GR_METHOD_CLEAR ,
@@ -748,6 +750,8 @@ typedef void ((*gr_method_swap_op)(gr_ptr, gr_ptr, gr_ctx_ptr));
748750typedef int ((* gr_method_ctx )(gr_ctx_ptr ));
749751typedef void ((* gr_method_ctx_void_op )(gr_ctx_ptr ));
750752typedef truth_t ((* gr_method_ctx_predicate )(gr_ctx_ptr ));
753+ typedef slong ((* gr_method_ctx_size )(gr_ctx_ptr ));
754+ typedef int ((* gr_method_ctx_gen_name )(char * * , slong , gr_ctx_ptr ));
751755typedef int ((* gr_method_ctx_set_si )(gr_ctx_ptr , slong ));
752756typedef int ((* gr_method_ctx_get_si )(slong * , gr_ctx_ptr ));
753757typedef int ((* gr_method_ctx_set_truth )(gr_ctx_ptr , truth_t ));
@@ -847,6 +851,8 @@ typedef int ((*gr_method_set_fexpr_op)(gr_ptr, fexpr_vec_t, gr_vec_t, const fexp
847851#define GR_CTX_VOID_OP (ctx , NAME ) (((gr_method_ctx_void_op *) ctx->methods)[GR_METHOD_ ## NAME])
848852#define GR_CTX_STREAM (ctx , NAME ) (((gr_method_ctx_stream *) ctx->methods)[GR_METHOD_ ## NAME])
849853#define GR_CTX_PREDICATE (ctx , NAME ) (((gr_method_ctx_predicate *) ctx->methods)[GR_METHOD_ ## NAME])
854+ #define GR_CTX_SIZE (ctx , NAME ) (((gr_method_ctx_size *) ctx->methods)[GR_METHOD_ ## NAME])
855+ #define GR_CTX_GEN_NAME (ctx , NAME ) (((gr_method_ctx_gen_name *) ctx->methods)[GR_METHOD_ ## NAME])
850856#define GR_CTX_SET_SI (ctx , NAME ) (((gr_method_ctx_set_si *) ctx->methods)[GR_METHOD_ ## NAME])
851857#define GR_CTX_GET_SI (ctx , NAME ) (((gr_method_ctx_get_si *) ctx->methods)[GR_METHOD_ ## NAME])
852858#define GR_CTX_SET_TRUTH (ctx , NAME ) (((gr_method_ctx_set_truth *) ctx->methods)[GR_METHOD_ ## NAME])
@@ -975,6 +981,8 @@ GR_INLINE WARN_UNUSED_RESULT int gr_ctx_get_real_prec(slong * prec, gr_ctx_t ctx
975981GR_INLINE WARN_UNUSED_RESULT int gr_ctx_set_is_field (gr_ctx_t ctx , truth_t is_field ) { return GR_CTX_SET_TRUTH (ctx , CTX_SET_IS_FIELD )(ctx , is_field ); }
976982GR_INLINE WARN_UNUSED_RESULT int gr_ctx_set_gen_name (gr_ctx_t ctx , const char * s ) { return GR_CTX_SET_STR (ctx , CTX_SET_GEN_NAME )(ctx , s ); }
977983GR_INLINE WARN_UNUSED_RESULT int gr_ctx_set_gen_names (gr_ctx_t ctx , const char * * s ) { return GR_CTX_SET_STRS (ctx , CTX_SET_GEN_NAMES )(ctx , s ); }
984+ GR_INLINE int gr_ctx_ngens (slong * ngens , gr_ctx_t ctx ) { return GR_CTX_GET_SI (ctx , CTX_NGENS )(ngens , ctx ); }
985+ GR_INLINE int gr_ctx_gen_name (char * * name , slong i , gr_ctx_t ctx ) { return GR_CTX_GEN_NAME (ctx , CTX_GEN_NAME )(name , i , ctx ); }
978986
979987GR_INLINE slong _gr_ctx_get_real_prec (gr_ctx_t ctx )
980988{
0 commit comments