Function is_attached:
Defined in module non_object (file: /std/object/non_object.c)

returns 1 if the ATTACHED flag is set for this object.

Prototype:
int is_attached();
