[PATCH] un-nest findidx()

Konstantin Serebryany konstantin.s.serebryany@gmail.com
Wed Jun 18 14:00:00 GMT 2014


Hi,

Please review the patch which removes nested functions findidx and replaces them
with two 'static inline' functions: findidx and findidxwc.
No functionality change intended.

un-nesting glibc function was previously discussed here:
https://sourceware.org/ml/libc-alpha/2014-05/msg00400.html

Thanks!

--kcc

2014-06-18  Kostya Serebryany  <konstantin.s.serebryany@gmail.com>

        * locale/weight.h: add include guard.
        (findidx): un-nest, make it static inline, add parameters.
        * locale/weightwc.h: add include guard, rename findidx to findidxwc.
        (findidxwc): un-nest, make it static inline, add parameters.
        * posix/fnmatch_loop.c: include weightwc.h or weight.h depending on
        WIDE_CHAR_VERSION. Define FINDIDX as findidxwc or findidx.
        (FCT): change type of 'extra' to wint_t; do not include weight.h,
        un-nest calls to findidx.
        * posix/regcomp.c: include weight.h.
        (build_equiv_class): don't include weight.h, un-nest findidx.
        * posix/regex_internal.h: include weight.h
        (re_string_elem_size_at): don't include weight.h, un-nest findidx.
        * posix/regexec.c: include weight.h.
        (check_node_accept_bytes): don't include weight.h, un-nest findidx.
        * string/strcoll_l.c: define FINDIDX, include WEIGHT_H.
        (get_next_seq): don't include WEIGHT_H, un-nest findidx.
        (get_next_seq_nocache): don't include WEIGHT_H, un-nest findidx.
        * string/strxfrm_l.c: define FINDIDX, include WEIGHT_H.
        (STRXFRM): don't include WEIGHT_H, un-nest findidx.
        * wcsmbs/wcscoll_l.c: define FINDIDX.
        * wcsmbs/wcsxfrm_l.c: define FINDIDX.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unnest-findidx.patch
Type: text/x-patch
Size: 11225 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140618/c97414ce/attachment.bin>


More information about the Libc-alpha mailing list