static void alloc_pnt(Prop* p) { // this is complex because it can be called either before or // after the hoc object has been created. And so there // must be communication between alloc_pnt and hoc_construct_point. // need the prop->dparam[1]._pvoid if (nrn_point_prop_) { p->dparam = nrn_point_prop_->dparam; p->ob = nrn_point_prop_->ob; //printf("p->ob comes from nrn_point_prop_ %s\n", hoc_object_name(p->ob)); }else{ p->dparam = (Datum*)hoc_Ecalloc(2, sizeof(Datum)); if (last_created_pp_ob_) { p->ob = last_created_pp_ob_; //printf("p->ob comes from last_created %s\n", hoc_object_name(p->ob)); }else{ Symbol* mech = ((HocMech*)memb_func[p->type].hoc_mech)->mech; skip_ = true; //printf("p->ob comes from hoc_newobj1 %s\n", mech->name); p->ob = hoc_newobj1(mech, 0); skip_ = false; } } last_created_pp_ob_ = nil; }
Datum* nrn_prop_datum_alloc(int type, int count, Prop* p) { Datum* ppd = (Datum*)hoc_Ecalloc(count, sizeof(Datum)); hoc_malchk(); return ppd; }
double* nrn_prop_data_alloc(int type, int count, Prop* p) { double* pd = (double*)hoc_Ecalloc(count, sizeof(double)); hoc_malchk(); return pd; }