server: Added unlink_named_object function.

Allows to remove the name of an object while keeping around the object
itself.
This commit is contained in:
Alexandre Julliard 2006-03-06 21:00:09 +01:00
parent 251be542ac
commit 8cea993033
2 changed files with 8 additions and 0 deletions

View File

@ -217,6 +217,13 @@ void dump_object_name( struct object *obj )
}
}
/* unlink a named object from its namespace, without freeing the object itself */
void unlink_named_object( struct object *obj )
{
if (obj->name) free_name( obj );
obj->name = NULL;
}
/* grab an object (i.e. increment its refcount) and return the object */
struct object *grab_object( void *ptr )
{

View File

@ -109,6 +109,7 @@ extern void *create_object( struct namespace *namespace, const struct object_ops
const struct unicode_str *name, struct object *parent );
extern void *create_named_object( struct namespace *namespace, const struct object_ops *ops,
const struct unicode_str *name, unsigned int attributes );
extern void unlink_named_object( struct object *obj );
extern struct namespace *create_namespace( unsigned int hash_size );
/* grab/release_object can take any pointer, but you better make sure */
/* that the thing pointed to starts with a struct object... */