[handle] Inline handle-private.h in handle.h
authorLudovic Henry <ludovic@xamarin.com>
Wed, 6 Jan 2016 11:23:05 +0000 (11:23 +0000)
committerLudovic Henry <ludovic@xamarin.com>
Wed, 13 Jan 2016 13:08:16 +0000 (13:08 +0000)
MonoHandleArena functions need to be as public as MonoHandle functions, as we cannot have one without the other.

mono/metadata/Makefile.am
mono/metadata/handle-private.h [deleted file]
mono/metadata/handle.c
mono/metadata/handle.h
mono/unit-tests/test-mono-handle.c

index a0d7c20748e1601b1e384f22cb8a78f544beb16d..ff8b646fbd6bdba9095bb14d71ecbc9f92f78e73 100644 (file)
@@ -216,8 +216,7 @@ common_sources = \
        seq-points-data.h       \
        seq-points-data.c       \
        handle.c        \
-       handle.h        \
-       handle-private.h
+       handle.h
 
 
 # These source files have compile time dependencies on GC code
diff --git a/mono/metadata/handle-private.h b/mono/metadata/handle-private.h
deleted file mode 100644 (file)
index a991b9b..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef __MONO_HANDLE_PRIVATE_H__
-#define __MONO_HANDLE_PRIVATE_H__
-
-#include <mono/metadata/handle.h>
-
-typedef struct _MonoHandleArena MonoHandleArena;
-
-gsize
-mono_handle_arena_size (void);
-
-MonoHandle
-mono_handle_arena_new (MonoHandleArena *arena, MonoObject *obj);
-
-MonoHandle
-mono_handle_arena_elevate (MonoHandleArena *arena, MonoHandle handle);
-
-void
-mono_handle_arena_stack_push (MonoHandleArena **arena_stack, MonoHandleArena *arena);
-
-void
-mono_handle_arena_stack_pop (MonoHandleArena **arena_stack, MonoHandleArena *arena);
-
-void
-mono_handle_arena_initialize (MonoHandleArena **arena_stack);
-
-void
-mono_handle_arena_deinitialize (MonoHandleArena **arena_stack);
-
-#endif/*__MONO_HANDLE_PRIVATE_H__*/
index 885c723be733371aad72e483964726e110fa080f..eb04ff70e906c24560258fab95cb7f5c8503da9d 100644 (file)
@@ -11,7 +11,6 @@
 #include <glib.h>
 
 #include <mono/metadata/handle.h>
-#include <mono/metadata/handle-private.h>
 #include <mono/metadata/object-internals.h>
 #include <mono/metadata/gc-internals.h>
 #include <mono/utils/atomic.h>
index 82fee80a0fb42e2a598ac50bd5fde6bf0fe1764f..800e09c102da56e34b46410c0e32a7aa65d6733c 100644 (file)
@@ -22,9 +22,6 @@
 
 G_BEGIN_DECLS
 
-typedef struct _MonoHandleStorage MonoHandleStorage;
-typedef MonoHandleStorage* MonoHandle;
-
 /*
  * DO NOT ACCESS DIRECTLY
  * USE mono_handle_obj BELOW TO ACCESS OBJ
@@ -32,9 +29,34 @@ typedef MonoHandleStorage* MonoHandle;
  * The field obj is not private as there is no way to do that
  * in C, but using a C++ template would simplify that a lot
  */
-struct _MonoHandleStorage {
+typedef struct {
        MonoObject *obj;
-};
+} MonoHandleStorage;
+
+typedef MonoHandleStorage* MonoHandle;
+
+typedef struct _MonoHandleArena MonoHandleArena;
+
+gsize
+mono_handle_arena_size (void);
+
+MonoHandle
+mono_handle_arena_new (MonoHandleArena *arena, MonoObject *obj);
+
+MonoHandle
+mono_handle_arena_elevate (MonoHandleArena *arena, MonoHandle handle);
+
+void
+mono_handle_arena_stack_push (MonoHandleArena **arena_stack, MonoHandleArena *arena);
+
+void
+mono_handle_arena_stack_pop (MonoHandleArena **arena_stack, MonoHandleArena *arena);
+
+void
+mono_handle_arena_initialize (MonoHandleArena **arena_stack);
+
+void
+mono_handle_arena_deinitialize (MonoHandleArena **arena_stack);
 
 #ifndef CHECKED_BUILD
 
index 8fa4aed6738262e457bc8ebce71f8a2d395494d3..fd916a659061434fe2f093a56469eeb23170509a 100644 (file)
@@ -10,7 +10,6 @@
 #include <config.h>
 #include <glib.h>
 #include <mono/metadata/handle.h>
-#include <mono/metadata/handle-private.h>
 
 static void
 test2_arena_push_pop ()