mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Warn if p == NULL && max != 0. (#110087)
2003-04-07 Matthias Clasen <maclas@gmx.de> * glib/gutf8.c (g_utf8_strlen): Warn if p == NULL && max != 0. (#110087)
This commit is contained in:
parent
8e0ff6907c
commit
048002c8f7
@ -1,3 +1,8 @@
|
||||
2003-04-07 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* glib/gutf8.c (g_utf8_strlen): Warn if p == NULL && max != 0.
|
||||
(#110087)
|
||||
|
||||
2003-04-01 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib/glib.def: Add g_string_chunk_insert_len.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-04-07 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* glib/gutf8.c (g_utf8_strlen): Warn if p == NULL && max != 0.
|
||||
(#110087)
|
||||
|
||||
2003-04-01 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib/glib.def: Add g_string_chunk_insert_len.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-04-07 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* glib/gutf8.c (g_utf8_strlen): Warn if p == NULL && max != 0.
|
||||
(#110087)
|
||||
|
||||
2003-04-01 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib/glib.def: Add g_string_chunk_insert_len.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-04-07 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* glib/gutf8.c (g_utf8_strlen): Warn if p == NULL && max != 0.
|
||||
(#110087)
|
||||
|
||||
2003-04-01 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib/glib.def: Add g_string_chunk_insert_len.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-04-07 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* glib/gutf8.c (g_utf8_strlen): Warn if p == NULL && max != 0.
|
||||
(#110087)
|
||||
|
||||
2003-04-01 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib/glib.def: Add g_string_chunk_insert_len.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-04-07 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* glib/gutf8.c (g_utf8_strlen): Warn if p == NULL && max != 0.
|
||||
(#110087)
|
||||
|
||||
2003-04-01 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* glib/glib.def: Add g_string_chunk_insert_len.
|
||||
|
@ -202,7 +202,8 @@ g_utf8_prev_char (const gchar *p)
|
||||
* @p: pointer to the start of a UTF-8 encoded string.
|
||||
* @max: the maximum number of bytes to examine. If @max
|
||||
* is less than 0, then the string is assumed to be
|
||||
* nul-terminated.
|
||||
* nul-terminated. If @max is 0, @p will not be examined and
|
||||
* may be %NULL.
|
||||
*
|
||||
* Returns the length of the string in characters.
|
||||
*
|
||||
@ -214,6 +215,7 @@ g_utf8_strlen (const gchar *p,
|
||||
{
|
||||
glong len = 0;
|
||||
const gchar *start = p;
|
||||
g_return_val_if_fail (p != NULL || max == 0, 0);
|
||||
|
||||
if (max < 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user