Author: miguel
Date: 2006-11-18 14:01:46 -0500 (Sat, 18 Nov 2006)
New Revision: 68128

Modified:
   trunk/mono/mono/docscripts/sources/mono-api-string.html
   trunk/mono/mono/docscripts/sources/mono-api-utils.html
Log:
More documentation

Modified: trunk/mono/mono/docscripts/sources/mono-api-string.html
===================================================================
--- trunk/mono/mono/docscripts/sources/mono-api-string.html     2006-11-18 
18:02:07 UTC (rev 68127)
+++ trunk/mono/mono/docscripts/sources/mono-api-string.html     2006-11-18 
19:01:46 UTC (rev 68128)
@@ -1,6 +1,33 @@
-
 <h2>Strings</h2>
 
+       <p>Strings inside the Mono runtime are represented with the
+       MonoString structure, which is:
+
+       <pre class="code">
+       
+       typedef struct {
+               MonoObject object;
+               gint32 length;
+               gunichar2 chars [0];
+       } MonoString;
+
+       </pre>
+
+       <p>All of the operations on strings are done on pointers to
+       MonoString objects, like this:
+
+       <pre class="code">
+       MonoString *hello = mono_string_new (mono_domain_get (), "hello, 
world");
+       </pre>
+
+       <p>Strings are bound to a particular application domain, which
+       is why it is necessary to pass a MonoDomain argument as the
+       first parameter to all the constructor functions. 
+
+       <p>Typically, you want to create the strings on the current
+       application domain, so a call to <tt>mono_domain_get()</tt> is
+       sufficient.
+       
 <h3>Constructors</h3>
        
 <h4><a name="api:mono_string_new">mono_string_new</a></h4>
@@ -11,8 +38,6 @@
 
 <h3>Conversions</h3>
 
-<h4><a name="api:mono_string_to_ansibstr">mono_string_to_ansibstr</a></h4>
-<h4><a name="api:mono_string_to_bstr">mono_string_to_bstr</a></h4>
 <h4><a name="api:mono_string_to_byvalstr">mono_string_to_byvalstr</a></h4>
 <h4><a name="api:mono_string_to_byvalwstr">mono_string_to_byvalwstr</a></h4>
 <h4><a name="api:mono_string_to_utf16">mono_string_to_utf16</a></h4>
@@ -39,10 +64,23 @@
 <h4><a 
name="api:mono_string_builder_to_utf16">mono_string_builder_to_utf16</a></h4>
 <h4><a 
name="api:mono_string_builder_to_utf8">mono_string_builder_to_utf8</a></h4>
 
-<h3>From Metadata</h3>
-
 <h3>Other Encodings</h3>
 
+       <p>These routines are used when coping with strings that come
+       from Mono's environment, and might be encoded in one or more
+       of the external encodings.
+
+       <p>For example, some file systems might historically contain a
+       mix of file names with both old and new encodings, typically
+       UTF8 for new files, and the old files would be encoded in an 8
+       bit character set (ISO-8859-1 for example).
+       
+       <p>These routines try a number of encodings, those specified
+       in the <tt>MONO_ENCODINGS</tt> environment variable and return
+       unicode strings that can be used internally.
+
+       <p>See the mono(1) man page for more details.
+       
 <h4><a 
name="api:mono_unicode_from_external">mono_unicode_from_external</a></h4>
 <h4><a name="api:mono_unicode_to_external">mono_unicode_to_external</a></h4>
 <h4><a name="api:mono_utf8_from_external">mono_utf8_from_external</a></h4>

Modified: trunk/mono/mono/docscripts/sources/mono-api-utils.html
===================================================================
--- trunk/mono/mono/docscripts/sources/mono-api-utils.html      2006-11-18 
18:02:07 UTC (rev 68127)
+++ trunk/mono/mono/docscripts/sources/mono-api-utils.html      2006-11-18 
19:01:46 UTC (rev 68128)
@@ -31,8 +31,16 @@
 <h4><a 
name="api:mono_bitset_find_first_unset">mono_bitset_find_first_unset</a></h4>
 <h4><a 
name="api:mono_bitset_intersection_2">mono_bitset_intersection_2</a></h4>
 
-<h3>Hashtable</h3>
+<h3>Hashtables</h3>
 
+       <p><tt>GHashTable</tt> is used when you need to store object
+       references into a hashtable, objects stored in a
+       <tt>MonoGHashTable</tt> are properly tracked by the garbage
+       collector.
+
+       <p>The <tt>MonoGHashTable</tt> data type has the same API as
+       the GLIB.
+       
 <h4><a name="api:mono_g_hash_table_destroy">mono_g_hash_table_destroy</a></h4>
 <h4><a name="api:mono_g_hash_table_foreach">mono_g_hash_table_foreach</a></h4>
 <h4><a 
name="api:mono_g_hash_table_foreach_remove">mono_g_hash_table_foreach_remove</a></h4>
@@ -50,6 +58,12 @@
 
 <h3>Raw buffer</h3>
 
+       <p>Raw buffers provide an abstraction to load segments of
+       files into memory.  If the operating system supports it, the
+       files are not loaded, but are mapped into the address space of
+       the process (On Unix, this is done using the <tt>mmap(2)</tt>
+       system call).
+       
 <h4><a name="api:mono_raw_buffer_load">mono_raw_buffer_load</a></h4>
 <h4><a name="api:mono_raw_buffer_update">mono_raw_buffer_update</a></h4>
 <h4><a name="api:mono_raw_buffer_free">mono_raw_buffer_free</a></h4>
@@ -74,12 +88,29 @@
 
 <h3>Memory Pools</h3>
 
+       <p>Memory pools are a convenient way of tracking memory
+       allocations that are used for one specific task, they are also
+       faster than using the standard memory allocation procedures,
+       as they are designed to be used only by a single thread at a
+       time. 
+
+       <p><tt>MonoMemPool</tt> objects are not thread safe, which
+       means that you should not share the objects across multiple
+       threads without providing proper locking around it (unlike
+       <tt>malloc</tt> and <tt>free</tt> which are thread safe). 
+
+       <p>When a <tt>MonoMemPool</tt> is released with
+       <tt>mono_mempool_destroy</tt> all of the of the memory
+       allocated from that memory pool with
+       <tt>mono_mempool_alloc</tt> and <tt>mono_mempool_alloc0</tt>
+       is released.
+       
+<h4><a name="api:mono_mempool_new">mono_mempool_new</a></h4>
+<h4><a name="api:mono_mempool_destroy">mono_mempool_destroy</a></h4>
+<h4><a name="api:mono_mempool_alloc">mono_mempool_alloc</a></h4>
 <h4><a name="api:mono_mempool_alloc0">mono_mempool_alloc0</a></h4>
-<h4><a name="api:mono_mempool_alloc">mono_mempool_alloc</a></h4>
-<h4><a name="api:mono_mempool_destroy">mono_mempool_destroy</a></h4>
 <h4><a name="api:mono_mempool_empty">mono_mempool_empty</a></h4>
 <h4><a name="api:mono_mempool_invalidate">mono_mempool_invalidate</a></h4>
-<h4><a name="api:mono_mempool_new">mono_mempool_new</a></h4>
 <h4><a name="api:mono_mempool_stats">mono_mempool_stats</a></h4>
 <h4><a 
name="api:mono_mempool_contains_addr">mono_mempool_contains_addr</a></h4> 
  

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to