Code: Select all
oc>objref nil
oc>print nil
NULLobject
oc>
Not quite.Is that true?
hoc_objgetarg(1) returns an Object** so it is typically called via
Object* o = *hoc_objgetarg(1);
Then, if you want to be safe, check that the Object is a reference to a NetCon with
check_obj_type(o, "NetCon");
And then finally extract the pointer to the c++ NetCon object
void* vnc = o->u.this_pointer;
vnc can be the first arg to nrn_netcon_event