Alexandre Julliard : server: Added unlink_named_object function.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Mar 6 15:27:55 CST 2006


Module: wine
Branch: refs/heads/master
Commit: 8cea993033944e927e6bcbceda647322d00916e5
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=8cea993033944e927e6bcbceda647322d00916e5

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Mar  6 21:00:09 2006 +0100

server: Added unlink_named_object function.

Allows to remove the name of an object while keeping around the object
itself.

---

 server/object.c |    7 +++++++
 server/object.h |    1 +
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/server/object.c b/server/object.c
index e881a69..fbef1a1 100644
--- a/server/object.c
+++ b/server/object.c
@@ -217,6 +217,13 @@ void dump_object_name( struct object *ob
     }
 }
 
+/* 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 )
 {
diff --git a/server/object.h b/server/object.h
index 4a137fd..319bbba 100644
--- a/server/object.h
+++ b/server/object.h
@@ -109,6 +109,7 @@ extern void *create_object( struct names
                             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... */




More information about the wine-cvs mailing list