mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-23 20:46:14 +01:00
comments/docs: Fix couple of typos
https://bugzilla.gnome.org/show_bug.cgi?id=668857
This commit is contained in:
parent
9a7a98bf3b
commit
7486cd946a
@ -403,7 +403,7 @@ g_base64_decode (const gchar *text,
|
|||||||
input_length = strlen (text);
|
input_length = strlen (text);
|
||||||
|
|
||||||
/* We can use a smaller limit here, since we know the saved state is 0,
|
/* We can use a smaller limit here, since we know the saved state is 0,
|
||||||
+1 used to avoid calling g_malloc0(0), and hence retruning NULL */
|
+1 used to avoid calling g_malloc0(0), and hence returning NULL */
|
||||||
ret = g_malloc0 ((input_length / 4) * 3 + 1);
|
ret = g_malloc0 ((input_length / 4) * 3 + 1);
|
||||||
|
|
||||||
*out_len = g_base64_decode_step (text, input_length, ret, &state, &save);
|
*out_len = g_base64_decode_step (text, input_length, ret, &state, &save);
|
||||||
|
@ -1834,7 +1834,7 @@ find_file_in_data_dirs (const gchar *file,
|
|||||||
* @full_path. If the file could not be loaded then an %error is
|
* @full_path. If the file could not be loaded then an %error is
|
||||||
* set to either a #GFileError or #GBookmarkFileError.
|
* set to either a #GFileError or #GBookmarkFileError.
|
||||||
*
|
*
|
||||||
* Return value: %TRUE if a key file could be loaded, %FALSE othewise
|
* Return value: %TRUE if a key file could be loaded, %FALSE otherwise
|
||||||
*
|
*
|
||||||
* Since: 2.12
|
* Since: 2.12
|
||||||
*/
|
*/
|
||||||
|
@ -564,7 +564,7 @@ sha1_transform (guint32 buf[5],
|
|||||||
D = buf[3];
|
D = buf[3];
|
||||||
E = buf[4];
|
E = buf[4];
|
||||||
|
|
||||||
/* Heavy mangling, in 4 sub-rounds of 20 interations each. */
|
/* Heavy mangling, in 4 sub-rounds of 20 iterations each. */
|
||||||
subRound (A, B, C, D, E, f1, K1, in[0]);
|
subRound (A, B, C, D, E, f1, K1, in[0]);
|
||||||
subRound (E, A, B, C, D, f1, K1, in[1]);
|
subRound (E, A, B, C, D, f1, K1, in[1]);
|
||||||
subRound (D, E, A, B, C, f1, K1, in[2]);
|
subRound (D, E, A, B, C, f1, K1, in[2]);
|
||||||
|
@ -203,7 +203,7 @@ static inline GQuark g_quark_new (gchar *string);
|
|||||||
G_LOCK_DEFINE_STATIC (g_dataset_global);
|
G_LOCK_DEFINE_STATIC (g_dataset_global);
|
||||||
static GHashTable *g_dataset_location_ht = NULL;
|
static GHashTable *g_dataset_location_ht = NULL;
|
||||||
static GDataset *g_dataset_cached = NULL; /* should this be
|
static GDataset *g_dataset_cached = NULL; /* should this be
|
||||||
threadspecific? */
|
thread specific? */
|
||||||
G_LOCK_DEFINE_STATIC (g_quark_global);
|
G_LOCK_DEFINE_STATIC (g_quark_global);
|
||||||
static GHashTable *g_quark_ht = NULL;
|
static GHashTable *g_quark_ht = NULL;
|
||||||
static gchar **g_quarks = NULL;
|
static gchar **g_quarks = NULL;
|
||||||
@ -838,7 +838,7 @@ g_datalist_id_get_data (GData **datalist,
|
|||||||
* @key: the string identifying a data element.
|
* @key: the string identifying a data element.
|
||||||
* @Returns: the data element, or %NULL if it is not found.
|
* @Returns: the data element, or %NULL if it is not found.
|
||||||
*
|
*
|
||||||
* Gets a data element, using its string identifer. This is slower than
|
* Gets a data element, using its string identifier. This is slower than
|
||||||
* g_datalist_id_get_data() because it compares strings.
|
* g_datalist_id_get_data() because it compares strings.
|
||||||
**/
|
**/
|
||||||
gpointer
|
gpointer
|
||||||
|
@ -1879,7 +1879,7 @@ g_date_get_sunday_weeks_in_year (GDateYear year)
|
|||||||
* @lhs: first date to compare
|
* @lhs: first date to compare
|
||||||
* @rhs: second date to compare
|
* @rhs: second date to compare
|
||||||
*
|
*
|
||||||
* qsort()-style comparsion function for dates.
|
* qsort()-style comparison function for dates.
|
||||||
* Both dates must be valid.
|
* Both dates must be valid.
|
||||||
*
|
*
|
||||||
* Returns: 0 for equal, less than zero if @lhs is less than @rhs,
|
* Returns: 0 for equal, less than zero if @lhs is less than @rhs,
|
||||||
|
@ -144,7 +144,7 @@ glib_gettext (const gchar *str)
|
|||||||
* This is an internal function and should only be used by
|
* This is an internal function and should only be used by
|
||||||
* the internals of glib (such as libgio).
|
* the internals of glib (such as libgio).
|
||||||
*
|
*
|
||||||
* Returns: the transation of @str to the current locale
|
* Returns: the translation of @str to the current locale
|
||||||
*/
|
*/
|
||||||
const gchar *
|
const gchar *
|
||||||
glib_pgettext (const gchar *msgctxtid,
|
glib_pgettext (const gchar *msgctxtid,
|
||||||
|
@ -321,7 +321,7 @@ g_rand_set_seed (GRand* rand, guint32 seed)
|
|||||||
/* [KNUTH 1981, The Art of Computer Programming */
|
/* [KNUTH 1981, The Art of Computer Programming */
|
||||||
/* Vol. 2 (2nd Ed.), pp102] */
|
/* Vol. 2 (2nd Ed.), pp102] */
|
||||||
|
|
||||||
if (seed == 0) /* This would make the PRNG procude only zeros */
|
if (seed == 0) /* This would make the PRNG produce only zeros */
|
||||||
seed = 0x6b842128; /* Just set it to another number */
|
seed = 0x6b842128; /* Just set it to another number */
|
||||||
|
|
||||||
rand->mt[0]= seed;
|
rand->mt[0]= seed;
|
||||||
|
@ -521,7 +521,7 @@ g_sequence_insert_before (GSequenceIter *iter,
|
|||||||
* Removes the item pointed to by @iter. It is an error to pass the
|
* Removes the item pointed to by @iter. It is an error to pass the
|
||||||
* end iterator to this function.
|
* end iterator to this function.
|
||||||
*
|
*
|
||||||
* If the sequnce has a data destroy function associated with it, this
|
* If the sequence has a data destroy function associated with it, this
|
||||||
* function is called on the data for the removed item.
|
* function is called on the data for the removed item.
|
||||||
*
|
*
|
||||||
* Since: 2.14
|
* Since: 2.14
|
||||||
|
@ -410,7 +410,7 @@ g_slice_init_nomessage (void)
|
|||||||
* fit less than 8 times (see [4]) into 4KB pages.
|
* fit less than 8 times (see [4]) into 4KB pages.
|
||||||
* we allow very small page sizes here, to reduce wastage in
|
* we allow very small page sizes here, to reduce wastage in
|
||||||
* threads if only small allocations are required (this does
|
* threads if only small allocations are required (this does
|
||||||
* bear the risk of incresing allocation times and fragmentation
|
* bear the risk of increasing allocation times and fragmentation
|
||||||
* though).
|
* though).
|
||||||
*/
|
*/
|
||||||
allocator->min_page_size = MAX (allocator->min_page_size, 4096);
|
allocator->min_page_size = MAX (allocator->min_page_size, 4096);
|
||||||
@ -1509,7 +1509,7 @@ smc_notify_free (void *pointer,
|
|||||||
/* --- g-slice memory checker tree implementation --- */
|
/* --- g-slice memory checker tree implementation --- */
|
||||||
#define SMC_TRUNK_COUNT (4093 /* 16381 */) /* prime, to distribute trunk collisions (big, allocated just once) */
|
#define SMC_TRUNK_COUNT (4093 /* 16381 */) /* prime, to distribute trunk collisions (big, allocated just once) */
|
||||||
#define SMC_BRANCH_COUNT (511) /* prime, to distribute branch collisions */
|
#define SMC_BRANCH_COUNT (511) /* prime, to distribute branch collisions */
|
||||||
#define SMC_TRUNK_EXTENT (SMC_BRANCH_COUNT * 2039) /* key adress space per trunk, should distribute uniformly across BRANCH_COUNT */
|
#define SMC_TRUNK_EXTENT (SMC_BRANCH_COUNT * 2039) /* key address space per trunk, should distribute uniformly across BRANCH_COUNT */
|
||||||
#define SMC_TRUNK_HASH(k) ((k / SMC_TRUNK_EXTENT) % SMC_TRUNK_COUNT) /* generate new trunk hash per megabyte (roughly) */
|
#define SMC_TRUNK_HASH(k) ((k / SMC_TRUNK_EXTENT) % SMC_TRUNK_COUNT) /* generate new trunk hash per megabyte (roughly) */
|
||||||
#define SMC_BRANCH_HASH(k) (k % SMC_BRANCH_COUNT)
|
#define SMC_BRANCH_HASH(k) (k % SMC_BRANCH_COUNT)
|
||||||
|
|
||||||
|
@ -722,7 +722,7 @@ static int
|
|||||||
main_selftest (int argc,
|
main_selftest (int argc,
|
||||||
char **argv)
|
char **argv)
|
||||||
{
|
{
|
||||||
/* gtester main() for --gtester-selftest invokations */
|
/* gtester main() for --gtester-selftest invocations */
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
g_test_add ("/gtester/fixture-test", guint, NULL, fixture_setup, fixture_test, fixture_teardown);
|
g_test_add ("/gtester/fixture-test", guint, NULL, fixture_setup, fixture_test, fixture_teardown);
|
||||||
return g_test_run();
|
return g_test_run();
|
||||||
|
@ -834,7 +834,7 @@ g_cond_broadcast (GCond *cond)
|
|||||||
* Notice that the end time is calculated once, before entering the
|
* Notice that the end time is calculated once, before entering the
|
||||||
* loop and reused. This is the motivation behind the use of absolute
|
* loop and reused. This is the motivation behind the use of absolute
|
||||||
* time on this API -- if a relative time of 5 seconds were passed
|
* time on this API -- if a relative time of 5 seconds were passed
|
||||||
* directly to the call and a spurious wakeup occured, the program would
|
* directly to the call and a spurious wakeup occurred, the program would
|
||||||
* have to start over waiting again (which would lead to a total wait
|
* have to start over waiting again (which would lead to a total wait
|
||||||
* time of more than 5 seconds).
|
* time of more than 5 seconds).
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user