Uuups, sorry, reading too fast; in C the precedence is rather different:
rb_gc_mark(*list->varptr); /* '->' is stronger than '*' */
So in fact, at the end Matz is giving back *(&VALUE), which is the same as
VALUE. So forget about the O(N**2) process. It seems that you (Paul) are
correct, that we can have either VALUE or VALUE*. And based on your
example (I don't know about other cases) it seems that
rb_gc_register_address is better off using VALUE instead of VALUE*.
Using VALUE, this is still valid:
a = Qnil;
rb_gc_register_address(a);
rb_gc_unregister_address(a); /* optional */
a = rb_ary_new();
rb_gc_register_address(a);
Using VALUE*, on the other hand, we just save some typing:
a = Qnil;
rb_gc_register_address(&a);
a = rb_ary_new();
/* no need for another rb_gc_register_address (&a) here */
Regards,
Bill