treemasterSetUserData(tm, tos);
static VALUE rbtm_settreeobserver(VALUE self, VALUE obs){  struct TreeObserver *to;  struct TreeObserverState *tos;  struct TreeMaster *tm;  Data_Get_Struct(self, struct TreeMaster, tm);  to = clCalloc(sizeof(*to), 1);  tos = clCalloc(sizeof(*tos), 1);  if (rb_obj_is_kind_of(obs, cTreeObserver))    tos->obs = obs;  else {    tos->obs = Qnil;    rb_raise(rb_eTypeError, "Error must have kind of TreeObserver in treemasterSetTreeObserver");  }  tos->th = Qnil;//  rb_gc_mark(tos->obs);  to->ptr = tos;  to->treesearchstarted = rbtmto_treesearchstarted;  // TODO: fix me by remove next 3 comment indicators  to->treeimproved = rbtmto_treeimproved;  to->treedone = rbtmto_treedone;  to->treerejected = rbtmto_treerejected;  //rb_raise(rb_eTypeError, "Error treemasterSetTreeObserver disabled.");  treemasterSetTreeObserver(tm, to);}