More documentation
authorMiguel de Icaza <miguel@gnome.org>
Sat, 18 Nov 2006 19:02:03 +0000 (19:02 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Sat, 18 Nov 2006 19:02:03 +0000 (19:02 -0000)
svn path=/trunk/mono/; revision=68129

mono/metadata/domain.c
mono/metadata/marshal.c
mono/metadata/object.c

index 6fc4a6d32d7dc0c6bf41f4d094b53ae0e3b849e6..faed2703dfecc22429d642ab5b6686fe139add95 100644 (file)
@@ -338,6 +338,13 @@ mono_jit_info_get_method (MonoJitInfo* ji)
        return ji->method;
 }
 
+/**
+ * mono_string_equal:
+ * @s1: First string to compare
+ * @s2: Second string to compare
+ *
+ * Returns FALSE if the strings differ.
+ */
 gboolean
 mono_string_equal (MonoString *s1, MonoString *s2)
 {
@@ -352,6 +359,12 @@ mono_string_equal (MonoString *s1, MonoString *s2)
        return memcmp (mono_string_chars (s1), mono_string_chars (s2), l1 * 2) == 0; 
 }
 
+/**
+ * mono_string_hash:
+ * @s: the string to hash
+ *
+ * Returns the hash for the string.
+ */
 guint
 mono_string_hash (MonoString *s)
 {
index 76a7533db20f4c0e6abb0c7621b36d12f44930a7..e14fea4a8ab7e4f2d41b0300dce47717201694e1 100644 (file)
@@ -745,6 +745,10 @@ mono_string_utf8_to_builder (MonoStringBuilder *sb, char *text)
        g_free (ut);
 }
 
+/*
+ * FIXME: This routine does not seem to do what it seems to do
+ * the @text is never copied into the string builder
+ */
 void
 mono_string_utf16_to_builder (MonoStringBuilder *sb, gunichar2 *text)
 {
@@ -761,6 +765,16 @@ mono_string_utf16_to_builder (MonoStringBuilder *sb, gunichar2 *text)
        sb->length = len;
 }
 
+/**
+ * mono_string_builder_to_utf8:
+ * @sb: the string builder
+ *
+ * Converts to utf8 the contents of the MonoStringBuilder.
+ *
+ * Returns: a utf8 string with the contents of the StringBuilder.
+ *
+ * The return value must be released with g_free.
+ */
 gpointer
 mono_string_builder_to_utf8 (MonoStringBuilder *sb)
 {
@@ -795,6 +809,16 @@ mono_string_builder_to_utf8 (MonoStringBuilder *sb)
        return res;
 }
 
+/**
+ * mono_string_builder_to_utf16:
+ * @sb: the string builder
+ *
+ * Converts to utf16 the contents of the MonoStringBuilder.
+ *
+ * Returns: a utf16 string with the contents of the StringBuilder.
+ *
+ * The return value must not be freed.
+ */
 gpointer
 mono_string_builder_to_utf16 (MonoStringBuilder *sb)
 {
@@ -900,6 +924,15 @@ mono_free_bstr (gpointer bstr)
 #endif
 }
 
+/**
+ * mono_string_to_byvalstr:
+ * @dst: Where to store the null-terminated utf8 decoded string.
+ * @src: the MonoString to copy.
+ * @size: the maximum number of bytes to copy.
+ *
+ * Copies the MonoString pointed to by @src as a utf8 string
+ * into @dst, it copies at most @size bytes into the destination.
+ */
 void
 mono_string_to_byvalstr (gpointer dst, MonoString *src, int size)
 {
@@ -922,6 +955,15 @@ mono_string_to_byvalstr (gpointer dst, MonoString *src, int size)
        *((char *)dst + size - 1) = 0;
 }
 
+/**
+ * mono_string_to_byvalwstr:
+ * @dst: Where to store the null-terminated utf16 decoded string.
+ * @src: the MonoString to copy.
+ * @size: the maximum number of bytes to copy.
+ *
+ * Copies the MonoString pointed to by @src as a utf16 string
+ * into @dst, it copies at most @size bytes into the destination.
+ */
 void
 mono_string_to_byvalwstr (gpointer dst, MonoString *src, int size)
 {
index ba83eb590714508d11a5b25ccf39c38fb4971368..c2eb799b95b211cb08c4fc9a475e0c7c0be3b6fe 100644 (file)
@@ -3395,7 +3395,7 @@ mono_string_is_interned (MonoString *o)
 }
 
 /**
- * mono_string_interne:
+ * mono_string_intern:
  * @o: String to intern
  *
  * Interns the string passed.  
@@ -4282,3 +4282,30 @@ mono_get_addr_from_ftnptr (gpointer descr)
        return descr;
 #endif
 }      
+
+#if 0
+/**
+ * mono_string_chars:
+ * @s: a MonoString
+ *
+ * Returns a pointer to the UCS16 characters stored in the MonoString
+ */
+gunichar2 *
+mono_string_chars(MonoString *s)
+{
+       /* This method is here only for documentation extraction, this is a macro */
+}
+
+/**
+ * mono_string_length:
+ * @s: MonoString
+ *
+ * Returns the lenght in characters of the string
+ */
+int
+mono_string_length (MonoString *s)
+{
+       /* This method is here only for documentation extraction, this is a macro */
+}
+
+#endif