Commit 8cea9930 authored by Alexandre Julliard's avatar Alexandre Julliard

server: Added unlink_named_object function.

Allows to remove the name of an object while keeping around the object itself.
parent 251be542
......@@ -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 )
{
......
......@@ -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... */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment