flint icon indicating copy to clipboard operation
flint copied to clipboard

Important missing gr methods

Open fredrik-johansson opened this issue 1 year ago • 3 comments

  • gr_ctx_init_set
  • gr_ctx_equal
  • gr_ctx_hash
  • gr_hash
  • gr_equal_repr

fredrik-johansson avatar Mar 21 '24 10:03 fredrik-johansson

An officially supported way of checking if a context has been initialized could also be useful.

mezzarobba avatar Mar 22 '24 19:03 mezzarobba

What do you mean? Before a context is initialized, its struct contains undefined data.

fredrik-johansson avatar Mar 22 '24 19:03 fredrik-johansson

On Friday, 22 March 2024 20:41:48 CET Fredrik Johansson wrote:

What do you mean? Before a context is initialized, its struct contains undefined data.

A documented equivalent of

gr_ctx_t ctx;
ctx->which_ring = GR_CTX_UNKNOWN_DOMAIN;
[...]
if(ctx->which_ring == GR_CTX_UNKNOWN_DOMAIN)

-- Marc

mezzarobba avatar Mar 22 '24 19:03 mezzarobba