Changeset 08e103d4 in mainline for kernel/test/test.c


Ignore:
Timestamp:
2019-02-05T18:26:05Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
1d2f85e
Parents:
d066259
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-05 16:16:55)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-05 18:26:05)
Message:

Use clearer naming for string length functions

This and the following commit change the names of functions, as well as
their documentation, to use unambiguous terms "bytes" and "code points"
instead of ambiguous terms "size", "length", and "characters".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/test/test.c

    rd066259 r08e103d4  
    6666    void **ctx)
    6767{
    68         size_t len = str_length(input);
     68        size_t len = str_code_points(input);
    6969        test_t **test = (test_t **) ctx;
    7070
     
    7575                const char *curname = (*test)->name;
    7676
    77                 if (str_length(curname) < len)
     77                if (str_code_points(curname) < len)
    7878                        continue;
    7979
     
    8282                        if (help)
    8383                                *help = (*test)->desc;
    84                         return (curname + str_lsize(curname, len));
     84                        return (curname + str_lbytes(curname, len));
    8585                }
    8686        }
Note: See TracChangeset for help on using the changeset viewer.