Changeset 1112 in svn for trunk/processor/struct.m4


Ignore:
Timestamp:
2012-08-01T17:55:06Z (3 years ago)
Author:
Xuefer
Message:

refactor: more strict standard

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/struct.m4

    r1049 r1112  
    4747            int xc_autocheck_assert_size = SIZEOF_$1, assert_count = COUNTOF_$1;
    4848            int xc_autocheck_done_size = 0, xc_autocheck_done_count = 0;
    49             const char *xc_autocheck_assert_names[] = { ifdef(`ELEMENTSOF_$1', `ELEMENTSOF_$1') };
     49            ifdef(`ELEMENTSOF_$1', `
     50                const char *xc_autocheck_assert_names[] = { ELEMENTSOF_$1 };
     51                size_t xc_autocheck_assert_names_count = sizeof(xc_autocheck_assert_names) / sizeof(xc_autocheck_assert_names[0]);
     52            ', `
     53                const char **xc_autocheck_assert_names = NULL;
     54                size_t xc_autocheck_assert_names_count = 0;
     55            ')
    5056            zend_bool xc_autocheck_skip = 0;
    5157            HashTable xc_autocheck_done_names;
     
    7581        /* {{{ autocheck */
    7682        if (!xc_autocheck_skip) {
    77             int name_check_errors = xc_check_names(__FILE__, __LINE__, "FUNC_NAME", xc_autocheck_assert_names, sizeof(xc_autocheck_assert_names) / sizeof(xc_autocheck_assert_names[0]), &xc_autocheck_done_names);
     83            int name_check_errors = xc_check_names(__FILE__, __LINE__, "FUNC_NAME", xc_autocheck_assert_names, xc_autocheck_assert_names_count, &xc_autocheck_done_names);
    7884
    7985            if (xc_autocheck_done_count != assert_count) {
Note: See TracChangeset for help on using the changeset viewer.