Changeset 726 in svn for branches/1.3/processor/head.m4


Ignore:
Timestamp:
2011-04-09T14:59:31+02:00 (4 years ago)
Author:
Xuefer
Message:

merge from trunk

Location:
branches/1.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3

  • branches/1.3/processor/head.m4

    r691 r726  
    299299}
    300300/* }}} */
     301/* {{{ field name checker */
     302IFASSERT(`dnl
     303int xc_check_names(const char *file, int line, const char *functionName, const char **assert_names, int assert_names_count, HashTable *done_names)
     304{
     305    int errors = 0;
     306    if (assert_names_count) {
     307        int i;
     308        Bucket *b;
     309
     310        for (i = 0; i < assert_names_count; ++i) {
     311            if (!zend_hash_exists(done_names, assert_names[i], strlen(assert_names[i]) + 1)) {
     312                fprintf(stderr
     313                    , "missing field at %s `#'%d %s`' : %s\n"
     314                    , file, line, functionName
     315                    , assert_names[i]
     316                    );
     317                ++errors;
     318            }
     319        }
     320
     321        for (b = done_names->pListHead; b != NULL; b = b->pListNext) {
     322            int known = 0;
     323            int i;
     324            for (i = 0; i < assert_names_count; ++i) {
     325                if (strcmp(assert_names[i], BUCKET_KEY_S(b)) == 0) {
     326                    known = 1;
     327                    break;
     328                }
     329            }
     330            if (!known) {
     331                fprintf(stderr
     332                    , "unknown field at %s `#'%d %s`' : %s\n"
     333                    , file, line, functionName
     334                    , BUCKET_KEY_S(b)
     335                    );
     336                ++errors;
     337            }
     338        }
     339    }
     340    return errors;
     341}
     342')
     343/* }}} */
    301344dnl ================ export API
    302345/* export: xc_entry_t *xc_processor_store_xc_entry_t(xc_entry_t *src TSRMLS_DC); :export {{{ */
Note: See TracChangeset for help on using the changeset viewer.