[gjs/wip/binary-data: 1/2] jsapi-util-string: drop stale comment



commit aaecab581b2d372b92cbb337cbc788de534a5ed2
Author: Ray Strode <rstrode redhat com>
Date:   Mon Oct 8 21:41:31 2012 -0400

    jsapi-util-string: drop stale comment
    
    The gjs_string_from_utf8 function has this comment:
    
        /* intentionally using n_bytes even though glib api suggests n_chars; with
         * n_chars (from g_utf8_strlen()) the result appears truncated
         */
    
    The glib documentation now says:
    
    len: the maximum length (number of bytes) of str to use. If len < 0, then the
         string is nul-terminated.
    
    So the comment is apparently out-of-date.
    
    This commit drops it.

 gjs/jsapi-util-string.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/gjs/jsapi-util-string.c b/gjs/jsapi-util-string.c
index 5a340be..a660250 100644
--- a/gjs/jsapi-util-string.c
+++ b/gjs/jsapi-util-string.c
@@ -125,10 +125,6 @@ gjs_string_from_utf8(JSContext  *context,
     JSString *s;
     GError *error;
 
-    /* intentionally using n_bytes even though glib api suggests n_chars; with
-     * n_chars (from g_utf8_strlen()) the result appears truncated
-     */
-
     error = NULL;
     u16_string = g_utf8_to_utf16(utf8_string,
                                  n_bytes,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]