object_d.c

gurba-0.40/lib/daemons/object_d.c · 413 B

From the archive gurba.tgz

Download the archive   « Back to the archive contents

static object *objs;

void create( void ) {
  objs = ({ });
}

void register_object( object ob ) {
  if( objs == 0 )
    objs = ({ });

  objs -= ({ ob });
  objs += ({ ob });
}

void unregister_object( object ob ) {
  if( objs == 0 )
    objs = ({ });

  objs -= ({ ob });
}

int query_number_objects( void ) {
  return( sizeof( objs ) );
}

object *query_objects( void ) {
  objs -= ({ 0 });
  return( objs );
}

Site Stats

Snippets: 1791
Codebases: 571