[docs] Update formatting in mono-api-methods.
authorJon Purdy <evincarofautumn@gmail.com>
Fri, 10 Mar 2017 00:09:45 +0000 (16:09 -0800)
committerJon Purdy <evincarofautumn@gmail.com>
Fri, 24 Mar 2017 20:43:07 +0000 (13:43 -0700)
mono/metadata/debug-helpers.c
mono/metadata/loader.c
mono/metadata/metadata.c
mono/metadata/object.c
mono/metadata/reflection.c
mono/metadata/verify.c

index e5c5c23fb74ea025a01d51bdc960321404cd2c07..f3f59c4f22082f21ba0954810548f25ea6af3aa0 100644 (file)
@@ -233,6 +233,9 @@ mono_type_full_name (MonoType *type)
        return g_string_free (str, FALSE);
 }
 
+/**
+ * mono_signature_get_desc:
+ */
 char*
 mono_signature_get_desc (MonoMethodSignature *sig, gboolean include_namespace)
 {
@@ -323,11 +326,11 @@ mono_context_get_desc (MonoGenericContext *context)
  * Creates a method description for \p name, which conforms to the following
  * specification:
  *
- * [namespace.]classname:methodname[(args...)]
+ * <code>[namespace.]classname:methodname[(args...)]</code>
  *
  * in all the loaded assemblies.
  *
- * Both classname and methodname can contain '*' which matches anything.
+ * Both classname and methodname can contain <code>*</code> which matches anything.
  *
  * \returns a parsed representation of the method description.
  */
@@ -400,6 +403,9 @@ mono_method_desc_new (const char *name, gboolean include_namespace)
        return result;
 }
 
+/**
+ * mono_method_desc_from_method:
+ */
 MonoMethodDesc*
 mono_method_desc_from_method (MonoMethod *method)
 {
@@ -417,7 +423,7 @@ mono_method_desc_from_method (MonoMethod *method)
 /**
  * mono_method_desc_free:
  * \param desc method description to be released
- * Releases the MonoMethodDesc object \p desc.
+ * Releases the \c MonoMethodDesc object \p desc.
  */
 void
 mono_method_desc_free (MonoMethodDesc *desc)
@@ -430,7 +436,7 @@ mono_method_desc_free (MonoMethodDesc *desc)
 }
 
 /**
- * mono_method_descr_match:
+ * mono_method_desc_match:
  * \param desc \c MonoMethoDescription
  * \param method \c MonoMethod to test
  *
@@ -505,6 +511,9 @@ match_class (MonoMethodDesc *desc, int pos, MonoClass *klass)
        return match_class (desc, pos, klass->nested_in);
 }
 
+/**
+ * mono_method_desc_full_match:
+ */
 gboolean
 mono_method_desc_full_match (MonoMethodDesc *desc, MonoMethod *method)
 {
@@ -516,6 +525,9 @@ mono_method_desc_full_match (MonoMethodDesc *desc, MonoMethod *method)
        return mono_method_desc_match (desc, method);
 }
 
+/**
+ * mono_method_desc_search_in_class:
+ */
 MonoMethod*
 mono_method_desc_search_in_class (MonoMethodDesc *desc, MonoClass *klass)
 {
@@ -528,6 +540,9 @@ mono_method_desc_search_in_class (MonoMethodDesc *desc, MonoClass *klass)
        return NULL;
 }
 
+/**
+ * mono_method_desc_search_in_image:
+ */
 MonoMethod*
 mono_method_desc_search_in_image (MonoMethodDesc *desc, MonoImage *image)
 {
@@ -892,6 +907,9 @@ mono_method_get_name_full (MonoMethod *method, gboolean signature, gboolean ret,
        return res;
 }
 
+/**
+ * mono_method_full_name:
+ */
 char *
 mono_method_full_name (MonoMethod *method, gboolean signature)
 {
index 6476c23269ac2256c84b323a727d335929653b36..562966662ef53fa19af28a7a17c3603128189697 100644 (file)
@@ -632,9 +632,10 @@ fail:
        return NULL;
 }
 
-/*
- * token is the method_ref/def/spec token used in a call IL instruction.
- * @deprecated use the _checked variant
+/**
+ * mono_method_get_signature_full:
+ * \p token is the method ref/def/spec token used in a \c call IL instruction.
+ * \deprecated use the \c _checked variant
  * Notes: runtime code MUST not use this function
  */
 MonoMethodSignature*
@@ -733,9 +734,10 @@ mono_method_get_signature_checked (MonoMethod *method, MonoImage *image, guint32
        return sig;
 }
 
-/*
- * token is the method_ref/def/spec token used in a call IL instruction.
- * @deprecated use the _checked variant
+/**
+ * mono_method_get_signature:
+ * \p token is the method_ref/def/spec token used in a call IL instruction.
+ * \deprecated use the \c _checked variant
  * Notes: runtime code MUST not use this function
  */
 MonoMethodSignature*
@@ -1711,6 +1713,9 @@ mono_get_method_from_token (MonoImage *image, guint32 token, MonoClass *klass,
        return result;
 }
 
+/**
+ * mono_get_method:
+ */
 MonoMethod *
 mono_get_method (MonoImage *image, guint32 token, MonoClass *klass)
 {
@@ -1720,6 +1725,9 @@ mono_get_method (MonoImage *image, guint32 token, MonoClass *klass)
        return result;
 }
 
+/**
+ * mono_get_method_full:
+ */
 MonoMethod *
 mono_get_method_full (MonoImage *image, guint32 token, MonoClass *klass,
                      MonoGenericContext *context)
@@ -1924,6 +1932,9 @@ mono_free_method  (MonoMethod *method)
        }
 }
 
+/**
+ * mono_method_get_param_names:
+ */
 void
 mono_method_get_param_names (MonoMethod *method, const char **names)
 {
@@ -2003,6 +2014,9 @@ mono_method_get_param_names (MonoMethod *method, const char **names)
        }
 }
 
+/**
+ * mono_method_get_param_token:
+ */
 guint32
 mono_method_get_param_token (MonoMethod *method, int index)
 {
@@ -2030,6 +2044,9 @@ mono_method_get_param_token (MonoMethod *method, int index)
        return 0;
 }
 
+/**
+ * mono_method_get_marshal_info:
+ */
 void
 mono_method_get_marshal_info (MonoMethod *method, MonoMarshalSpec **mspecs)
 {
@@ -2092,6 +2109,9 @@ mono_method_get_marshal_info (MonoMethod *method, MonoMarshalSpec **mspecs)
        }
 }
 
+/**
+ * mono_method_has_marshal_info:
+ */
 gboolean
 mono_method_has_marshal_info (MonoMethod *method)
 {
@@ -2248,6 +2268,9 @@ last_managed (MonoMethod *m, gint no, gint ilo, gboolean managed, gpointer data)
        return managed;
 }
 
+/**
+ * mono_method_get_last_managed:
+ */
 MonoMethod*
 mono_method_get_last_managed (void)
 {
@@ -2491,8 +2514,7 @@ mono_method_signature_checked (MonoMethod *m, MonoError *error)
 
 /**
  * mono_method_signature:
- *
- * Return the signature of the method M. On failure, returns NULL.
+ * \returns the signature of the method \p m. On failure, returns NULL.
  */
 MonoMethodSignature*
 mono_method_signature (MonoMethod *m)
@@ -2511,18 +2533,27 @@ mono_method_signature (MonoMethod *m)
        return sig;
 }
 
+/**
+ * mono_method_get_name:
+ */
 const char*
 mono_method_get_name (MonoMethod *method)
 {
        return method->name;
 }
 
+/**
+ * mono_method_get_class:
+ */
 MonoClass*
 mono_method_get_class (MonoMethod *method)
 {
        return method->klass;
 }
 
+/**
+ * mono_method_get_token:
+ */
 guint32
 mono_method_get_token (MonoMethod *method)
 {
@@ -2598,6 +2629,9 @@ mono_method_get_header_checked (MonoMethod *method, MonoError *error)
        return mono_metadata_parse_mh_full (img, container, (const char *)loc, error);
 }
 
+/**
+ * mono_method_get_header:
+ */
 MonoMethodHeader*
 mono_method_get_header (MonoMethod *method)
 {
@@ -2608,6 +2642,9 @@ mono_method_get_header (MonoMethod *method)
 }
 
 
+/**
+ * mono_method_get_flags:
+ */
 guint32
 mono_method_get_flags (MonoMethod *method, guint32 *iflags)
 {
@@ -2616,8 +2653,9 @@ mono_method_get_flags (MonoMethod *method, guint32 *iflags)
        return method->flags;
 }
 
-/*
- * Find the method index in the metadata methodDef table.
+/**
+ * mono_method_get_index:
+ * Find the method index in the metadata \c MethodDef table.
  */
 guint32
 mono_method_get_index (MonoMethod *method)
index f40d4a1c6c3d55422b7604f1af72fed9eb1739fb..80001ac6773487d41f2a076589c5d99e8b74555d 100644 (file)
@@ -3942,17 +3942,17 @@ mono_metadata_free_mh (MonoMethodHeader *mh)
        }
 }
 
-/*
+/**
  * mono_method_header_get_code:
- * @header: a MonoMethodHeader pointer
- * @code_size: memory location for returning the code size
- * @max_stack: memory location for returning the max stack
+ * \param header a \c MonoMethodHeader pointer
+ * \param code_size memory location for returning the code size
+ * \param max_stack memory location for returning the max stack
  *
  * Method header accessor to retreive info about the IL code properties:
  * a pointer to the IL code itself, the size of the code and the max number
  * of stack slots used by the code.
  *
- * Returns: pointer to the IL code represented by the method header.
+ * \returns pointer to the IL code represented by the method header.
  */
 const unsigned char*
 mono_method_header_get_code (MonoMethodHeader *header, guint32* code_size, guint32* max_stack)
@@ -3964,17 +3964,17 @@ mono_method_header_get_code (MonoMethodHeader *header, guint32* code_size, guint
        return header->code;
 }
 
-/*
+/**
  * mono_method_header_get_locals:
- * @header: a MonoMethodHeader pointer
- * @num_locals: memory location for returning the number of local variables
- * @init_locals: memory location for returning the init_locals flag
+ * \param header a \c MonoMethodHeader pointer
+ * \param num_locals memory location for returning the number of local variables
+ * \param init_locals memory location for returning the init_locals flag
  *
  * Method header accessor to retreive info about the local variables:
  * an array of local types, the number of locals and whether the locals
  * are supposed to be initialized to 0 on method entry
  *
- * Returns: pointer to an array of types of the local variables
+ * \returns pointer to an array of types of the local variables
  */
 MonoType**
 mono_method_header_get_locals (MonoMethodHeader *header, guint32* num_locals, gboolean *init_locals)
@@ -4000,19 +4000,19 @@ mono_method_header_get_num_clauses (MonoMethodHeader *header)
        return header->num_clauses;
 }
 
-/*
+/**
  * mono_method_header_get_clauses:
- * @header: a MonoMethodHeader pointer
- * @method: MonoMethod the header belongs to
- * @iter: pointer to a iterator
- * @clause: pointer to a MonoExceptionClause structure which will be filled with the info
+ * \param header a \c MonoMethodHeader pointer
+ * \param method \c MonoMethod the header belongs to
+ * \param iter pointer to a iterator
+ * \param clause pointer to a \c MonoExceptionClause structure which will be filled with the info
  *
- * Get the info about the exception clauses in the method. Set *iter to NULL to
+ * Get the info about the exception clauses in the method. Set \c *iter to NULL to
  * initiate the iteration, then call the method repeatedly until it returns FALSE.
  * At each iteration, the structure pointed to by clause if filled with the
  * exception clause information.
  *
- * Returns: TRUE if clause was filled with info, FALSE if there are no more exception
+ * \returns TRUE if clause was filled with info, FALSE if there are no more exception
  * clauses.
  */
 int
@@ -5288,6 +5288,9 @@ mono_metadata_type_dup (MonoImage *image, const MonoType *o)
        return r;
 }
 
+/**
+ * mono_signature_hash:
+ */
 guint
 mono_signature_hash (MonoMethodSignature *sig)
 {
@@ -6590,7 +6593,7 @@ mono_signature_get_return_type (MonoMethodSignature *sig)
  * A \c void* pointer must be initialized to NULL to start the iteration
  * and its address is passed to this function repeteadly until it returns
  * NULL.
- * \returns: the next parameter type of the method signature \p sig,
+ * \returns the next parameter type of the method signature \p sig,
  * NULL when finished.
  */
 MonoType*
index ebc0efed6d6ab16b64ea2f82f1ef63127440f52f..01cd68e6417c575dcb80d9a07b9983b099e39b1e 100644 (file)
@@ -2851,7 +2851,7 @@ do_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObject **ex
  * pointers to the value type otherwise. 
  * 
  * From unmanaged code you'll usually use the
- * mono_runtime_invoke() variant.
+ * \c mono_runtime_invoke variant.
  *
  * Note that this function doesn't handle virtual methods for
  * you, it will exec the exact method you pass: we still need to
@@ -2985,48 +2985,55 @@ mono_runtime_invoke_checked (MonoMethod *method, void *obj, void **params, MonoE
  * mono_method_get_unmanaged_thunk:
  * \param method method to generate a thunk for.
  *
- * Returns an unmanaged->managed thunk that can be used to call
+ * Returns an \c unmanaged->managed thunk that can be used to call
  * a managed method directly from C.
  *
  * The thunk's C signature closely matches the managed signature:
  *
- * C#: public bool Equals (object obj);
- * C:  typedef MonoBoolean (*Equals)(MonoObject*,
- *             MonoObject*, MonoException**);
+ * C#: <code>public bool Equals (object obj);</code>
+ *
+ * C:  <code>typedef MonoBoolean (*Equals)(MonoObject*, MonoObject*, MonoException**);</code>
+ *
+ * The 1st (<code>this</code>) parameter must not be used with static methods:
  *
- * The 1st ("this") parameter must not be used with static methods:
+ * C#: <code>public static bool ReferenceEquals (object a, object b);</code>
  *
- * C#: public static bool ReferenceEquals (object a, object b);
- * C:  typedef MonoBoolean (*ReferenceEquals)(MonoObject*, MonoObject*,
- *             MonoException**);
+ * C:  <code>typedef MonoBoolean (*ReferenceEquals)(MonoObject*, MonoObject*, MonoException**);</code>
  *
- * The last argument must be a non-null pointer of a MonoException* pointer.
- * It has "out" semantics. After invoking the thunk, *ex will be NULL if no
+ * The last argument must be a non-null \c MonoException* pointer.
+ * It has "out" semantics. After invoking the thunk, \c *ex will be NULL if no
  * exception has been thrown in managed code. Otherwise it will point
- * to the MonoException* caught by the thunk. In this case, the result of
+ * to the \c MonoException* caught by the thunk. In this case, the result of
  * the thunk is undefined:
  *
+ * <pre>
  * MonoMethod *method = ... // MonoMethod* of System.Object.Equals
+ *
  * MonoException *ex = NULL;
+ *
  * Equals func = mono_method_get_unmanaged_thunk (method);
+ *
  * MonoBoolean res = func (thisObj, objToCompare, &ex);
+ *
  * if (ex) {
+ *
  *    // handle exception
+ *
  * }
+ * </pre>
  *
  * The calling convention of the thunk matches the platform's default
  * convention. This means that under Windows, C declarations must
- * contain the __stdcall attribute:
+ * contain the \c __stdcall attribute:
  *
- * C:  typedef MonoBoolean (__stdcall *Equals)(MonoObject*,
- *             MonoObject*, MonoException**);
+ * C: <code>typedef MonoBoolean (__stdcall *Equals)(MonoObject*, MonoObject*, MonoException**);</code>
  *
  * LIMITATIONS
  *
  * Value type arguments and return values are treated as they were objects:
  *
- * C#: public static Rectangle Intersect (Rectangle a, Rectangle b);
- * C:  typedef MonoObject* (*Intersect)(MonoObject*, MonoObject*, MonoException**);
+ * C#: <code>public static Rectangle Intersect (Rectangle a, Rectangle b);</code>
+ * C:  <code>typedef MonoObject* (*Intersect)(MonoObject*, MonoObject*, MonoException**);</code>
  *
  * Arguments must be properly boxed upon trunk's invocation, while return
  * values must be unboxed.
index f455ee2cbacb9afeff7dc8e2ee929235ced65833..eb399a4b5594e2a5087ba618168b28165b457342 100644 (file)
@@ -567,13 +567,12 @@ mono_type_get_object_handle (MonoDomain *domain, MonoType *type, MonoError *erro
        return MONO_HANDLE_NEW (MonoReflectionType, mono_type_get_object_checked (domain, type, error));
 }
 
-/*
+/**
  * mono_method_get_object:
- * @domain: an app domain
- * @method: a method
- * @refclass: the reflected type (can be NULL)
- *
- * Return an System.Reflection.MonoMethod object representing the method @method.
+ * \param domain an app domain
+ * \param method a method
+ * \param refclass the reflected type (can be NULL)
+ * \returns A \c System.Reflection.MonoMethod object representing the method \p method.
  */
 MonoReflectionMethod*
 mono_method_get_object (MonoDomain *domain, MonoMethod *method, MonoClass *refclass)
@@ -1126,6 +1125,9 @@ fail:
        return MONO_HANDLE_NEW (MonoArray, NULL_HANDLE);
 }
 
+/**
+ * mono_param_get_objects:
+ */
 MonoArray*
 mono_param_get_objects (MonoDomain *domain, MonoMethod *method)
 {
@@ -1190,12 +1192,11 @@ leave:
        HANDLE_FUNCTION_RETURN_VAL (is_ok (error));
 }
 
-/*
+/**
  * mono_method_body_get_object:
- * @domain: an app domain
- * @method: a method
- *
- * Return an System.Reflection.MethodBody object representing the method @method.
+ * \param domain an app domain
+ * \param method a method
+ * \return A \c System.Reflection.MethodBody object representing the method \p method.
  */
 MonoReflectionMethodBody*
 mono_method_body_get_object (MonoDomain *domain, MonoMethod *method)
index f66a3de17c2eda8f4d122a6729f0c12c174486f4..4dea202e2dd7bf6d4fd94248d95d1b3842de53c9 100644 (file)
@@ -4813,6 +4813,10 @@ mono_opcode_is_prefix (int op)
 /*
  * FIXME: need to distinguish between valid and verifiable.
  * Need to keep track of types on the stack.
+ */
+
+/**
+ * mono_method_verify:
  * Verify types for opcodes.
  */
 GSList*