Documentation trivia

This commit is contained in:
Matthias Clasen 2005-05-02 15:45:45 +00:00
parent 728ab5ff7e
commit 1167d7d6a7
8 changed files with 67 additions and 24 deletions

View File

@ -1,3 +1,8 @@
2005-05-02 Matthias Clasen <mclasen@redhat.com>
* glib/gstring.c (g_str_equal, g_str_hash): Move docs
inline.
2005-05-01 Matthias Clasen <mclasen@redhat.com>
* glib/ghash.h: Rename some parameters to make gtk-doc

View File

@ -1,3 +1,8 @@
2005-05-02 Matthias Clasen <mclasen@redhat.com>
* glib/gstring.c (g_str_equal, g_str_hash): Move docs
inline.
2005-05-01 Matthias Clasen <mclasen@redhat.com>
* glib/ghash.h: Rename some parameters to make gtk-doc

View File

@ -1,3 +1,8 @@
2005-05-02 Matthias Clasen <mclasen@redhat.com>
* glib/gstring.c (g_str_equal, g_str_hash): Move docs
inline.
2005-05-01 Matthias Clasen <mclasen@redhat.com>
* glib/ghash.h: Rename some parameters to make gtk-doc

View File

@ -1,3 +1,8 @@
2005-05-02 Matthias Clasen <mclasen@redhat.com>
* glib/gstring.c (g_str_equal, g_str_hash): Move docs
inline.
2005-05-01 Matthias Clasen <mclasen@redhat.com>
* glib/ghash.h: Rename some parameters to make gtk-doc

View File

@ -1,5 +1,8 @@
2005-05-02 Matthias Clasen <mclasen@redhat.com>
* glib/tmpl/hash_tables.sgml: Move some docs inline.
* glib/tmpl/windows.sgml:
* gobject/tmpl/signals.sgml:
* gobject/tmpl/generic_values.sgml:
* gobject/tmpl/gtype.sgml:

View File

@ -51,6 +51,9 @@ To destroy a #GHashTable use g_hash_table_destroy().
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GHashTable ##### -->
<para>
The <structname>GHashTable</structname> struct is an opaque data structure to represent a
@ -311,8 +314,6 @@ This function is deprecated and will be removed in the next major
@v1:
@v2:
@Returns:
<!-- # Unused Parameters # -->
@v:
<!-- ##### FUNCTION g_int_hash ##### -->
@ -326,26 +327,18 @@ This function is deprecated and will be removed in the next major
<!-- ##### FUNCTION g_str_equal ##### -->
<para>
Compares two strings and returns %TRUE if they are equal.
It can be passed to g_hash_table_new() as the @key_equal_func
parameter, when using strings as keys in a #GHashTable.
</para>
@v1:
@v2: a key to compare with @v.
@Returns: %TRUE if the two keys match.
<!-- # Unused Parameters # -->
@v: a key.
@v2:
@Returns:
<!-- ##### FUNCTION g_str_hash ##### -->
<para>
Converts a string to a hash value.
It can be passed to g_hash_table_new() as the @hash_func parameter, when
using strings as keys in a #GHashTable.
</para>
@v: a string key.
@Returns: a hash value corresponding to the key.
@v:
@Returns:

View File

@ -14,6 +14,9 @@ UNIX emulation on Windows.
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### MACRO MAXPATHLEN ##### -->
<para>
Provided for UNIX emulation on Windows; equivalent to UNIX
@ -23,19 +26,13 @@ macro %MAXPATHLEN, which is the maximum length of a filename
<!-- ##### TYPEDEF pid_t ##### -->
<para>
Provided for UNIX emulation on Windows; process ID type.
</para>
<!-- ##### MACRO pipe ##### -->
<para>
Provided for UNIX emulation on Windows; see documentation for <function>pipe()</function>
in any UNIX manual.
</para>
@phandles:
@phandles: file descriptors, the first one for reading, the second one for writing.
<!-- ##### FUNCTION g_win32_error_message ##### -->
@ -84,6 +81,15 @@ in any UNIX manual.
@Returns:
<!-- ##### FUNCTION g_win32_locale_filename_from_utf8 ##### -->
<para>
</para>
@utf8filename:
@Returns:
<!-- ##### MACRO G_WIN32_DLLMAIN_FOR_DLL_NAME ##### -->
<para>
On Windows, this macro defines a <function>DllMain()</function> function

View File

@ -59,6 +59,17 @@ static GMemChunk *string_mem_chunk = NULL;
/* Hash Functions.
*/
/**
* g_str_equal:
* @v1: a key.
* @v2: a key to compare with @v1.
*
* Compares two strings and returns %TRUE if they are equal.
* It can be passed to g_hash_table_new() as the @key_equal_func
* parameter, when using strings as keys in a #GHashTable.
*
* Returns: %TRUE if the two keys match.
*/
gboolean
g_str_equal (gconstpointer v1,
gconstpointer v2)
@ -69,11 +80,21 @@ g_str_equal (gconstpointer v1,
return strcmp (string1, string2) == 0;
}
/* 31 bit hash function */
/**
* g_str_hash:
* @v: a string key.
*
* Converts a string to a hash value.
* It can be passed to g_hash_table_new() as the @hash_func parameter,
* when using strings as keys in a #GHashTable.
*
* Returns: a hash value corresponding to the key.
*/
guint
g_str_hash (gconstpointer key)
g_str_hash (gconstpointer v)
{
const char *p = key;
/* 31 bit hash function */
const char *p = v;
guint h = *p;
if (h)