In perl.git, the branch smoke-me/khw-smoke has been created

<http://perl5.git.perl.org/perl.git/commitdiff/6f5a9d56194d4635cf4ee2c07d4d6c675da0fd01?hp=0000000000000000000000000000000000000000>

        at  6f5a9d56194d4635cf4ee2c07d4d6c675da0fd01 (commit)

- Log -----------------------------------------------------------------
commit 6f5a9d56194d4635cf4ee2c07d4d6c675da0fd01
Author: Karl Williamson <[email protected]>
Date:   Sat Dec 17 17:25:29 2016 -0700

    utf8.c Extract common code into macros
    
    The 3 case changing functions: to upper, lower, and title case are
    essentially identical except for what they call to actually do the
    change; those being different macros or functions.
    
    The fourth function, to fold, is identical to the other three for the
    first part of its code, but diverges at the end in order to handle some
    special cases.
    
    This commit replaces the first part of the bodies of these 4 functions
    by a common macro.  And it replaces the remainder of the first 3
    functions by another common macro.
    
    I'm not a fan of this kind of macro to use in generating code, but it
    seems the best way to keep these definitions in sync.  (It has to be a
    macro instead of a function because one of the parameters is a macro,
    which you can't pass to a function.  I suppose one could create
    functions that just calls their macro, and get around it that way, but
    it doesn't seem worth it.)
    
    This commit just moved the code to the macro, and I manually verified
    that there were no logic changes.
    
    1 of the passed-in functions requires one less argument (the final one)
    than the other 3.  I originally tried to do something with the C
    preprocessor to get around that, but it didn't work with the Win32
    version of the preprocessor, so I gave up and added a dummy parameter to
    the fourth function, which is static so that's ok to do.  Below, for the
    record is my original attempt:
    
        /* These two macros are used to make optional a parameter to the
         * passed-in function to the macros just above.  If the passed-in
         * function doesn't take the parameter, use PLACEHOLDER in the macro
         * call; otherwise surround the parameter by a PARAM() call */
        #define PARAM(parameter) ,parameter
        #define PLACEHOLDER    /* Something for the preprocessor to grab onto */
    
    And within the macro, it called the function like this:
    
        L1_func(*p, ustrp, lenp/*,*/ L1_func_extra_param)

M       embed.fnc
M       proto.h
M       utf8.c

commit c0f22bdfe311647d59f16487b291772dccd261f5
Author: Karl Williamson <[email protected]>
Date:   Sun Dec 18 13:38:01 2016 -0700

    APItest/t/handy.t: Bring final special case into loop
    
    All the tests in this file are now in two loops, one for the isFOO()
    macros, and the other for the toFOO() macros.  Thus the main logic
    applies to all, and tests can be added or changed easily.

M       ext/XS-APItest/t/handy.t

commit 374ab26f4cca9d82f3621bbf2aa820b2888defe5
Author: Karl Williamson <[email protected]>
Date:   Sun Dec 18 13:17:45 2016 -0700

    APItest/t/handy.t: White-space only
    
    Indent newly formed block

M       ext/XS-APItest/t/handy.t

commit 1ec3c41e71513fc8de47bed069c7dcebcab104a9
Author: Karl Williamson <[email protected]>
Date:   Sun Dec 18 12:40:06 2016 -0700

    APItest/t/handy.t: Add more tests
    
    Macros with the '_uvchr' suffix were not being tested at all.  Instead,
    the undocumented backwards-compatibility-only macros with the suffixes
    _uni were being tested, but these might diverge, and the tests wouldn't
    find that.

M       ext/XS-APItest/APItest.xs
M       ext/XS-APItest/t/handy.t

commit 8314038ebfcdc8f0d14170eb9a97056d49690afa
Author: Karl Williamson <[email protected]>
Date:   Sun Dec 18 11:55:49 2016 -0700

    APItest/t/handy.t: Add more tests
    
    The macros like isALPHA() were not getting tested; instead the theory
    being that testing isALPHA_A() was good enough because they are #defined
    to be the same.  But that might change and the tests wouldn't uncover
    that.  And it turned out that some things wern't getting tested at all
    if there was no _A version of the macro, for example isALNUM().  This
    commit adds test for the version of the isFOO() macros with no suffix.

M       ext/XS-APItest/APItest.pm
M       ext/XS-APItest/APItest.xs
M       ext/XS-APItest/t/handy.t

commit 20d7010de3c705049f9931242267702885f50fe9
Author: Karl Williamson <[email protected]>
Date:   Sat Dec 17 19:43:28 2016 -0700

    APItest/t/handy.t: Use abbrev. char name in test names
    
    I got tired of seeing all these long character names fly by on my screen
    while testing, so this changes to use any official Unicode abbreviation
    when available.  It's kind of silly to do this in this test, but I might
    extract and improve this for more general use in tests of characters in
    the future.
    
    This also changes some imports so that the full module name need not
    always be specified.

M       ext/XS-APItest/t/handy.t

commit bbb7902eb63f39c19136a7c639de4b3b15411948
Author: Karl Williamson <[email protected]>
Date:   Sat Dec 17 19:22:14 2016 -0700

    APItest/t/handy.t: White-space only
    
    indent newly formed block.

M       ext/XS-APItest/t/handy.t

commit 3bd37caa5717a23b87a9dd755ddc311b7f7de81c
Author: Karl Williamson <[email protected]>
Date:   Sat Dec 17 19:19:39 2016 -0700

    APItest/t/handy.t: Fold in another special case
    
    The previous commit revamped this .t to make most things
    part of a single loop.  This adds another thing that was outside it.

M       ext/XS-APItest/t/handy.t

commit d3faadd2747ad81b06b6e17df92b05eaf29fd2ed
Author: Karl Williamson <[email protected]>
Date:   Thu Dec 15 16:12:30 2016 -0700

    APItest/t/handy.t: Refactor for maintenance
    
    Over the years code has kept getting copied and modified slightly in
    each new place.  And a future commit would create still more.  This cuts
    down the number of slightly different versions to the minimum reasonably
    attainable.

M       ext/XS-APItest/t/handy.t

commit 9651c70d44f044c6422fd4577bad7bc674f15fcf
Author: Sawyer X <[email protected]>
Date:   Tue Dec 20 17:27:02 2016 +0100

    Pod typos

M       pod/perldelta.pod
-----------------------------------------------------------------------

--
Perl5 Master Repository

Reply via email to