Changeset 726 for branches/1.3/processor/struct.m4
- Timestamp:
- 2011-04-09T14:59:31+02:00 (2 years ago)
- Location:
- branches/1.3
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
processor/struct.m4 (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3
- Property svn:mergeinfo changed
/trunk merged: 709-720,722-723,725
- Property svn:mergeinfo changed
-
branches/1.3/processor/struct.m4
r623 r726 30 30 { 31 31 pushdef(`ELEMENTS_DONE') 32 ifdef(`SIZEOF_$1', , `m4_errprint(`AUTOCHECK WARN: $1: missing structinfo, dont panic')define(`SIZEOF_$1', 0)')33 32 IFASSERT(` 34 33 /* {{{ init assert */ 35 ifdef(`SIZEOF_$1', , `m4_errprint(`missing SIZEOF_$1, safe to ignore') define(`SIZEOF_$1', 0)')36 ifdef(`COUNTOF_$1', , `m4_errprint(`missing COUNTOF_$1, safe to ignore') define(`COUNTOF_$1', 0)')34 ifdef(`SIZEOF_$1', , `m4_errprint(`missing SIZEOF_$1, safe to ignore')') 35 ifdef(`COUNTOF_$1', , `m4_errprint(`missing COUNTOF_$1, safe to ignore'))') 37 36 dnl SIZEOF_x COUNTOF_x can be both defined or both not 38 37 ifdef(`SIZEOF_$1', ` … … 48 47 int assert_size = SIZEOF_$1, assert_count = COUNTOF_$1; 49 48 int done_size = 0, done_count = 0; 49 const char *assert_names[] = { ifdef(`ELEMENTSOF_$1', `ELEMENTSOF_$1') }; 50 HashTable done_names; 51 zend_hash_init(&done_names, 0, NULL, NULL, 0); 50 52 /* }}} */ 51 53 IFRESTORE(`assert(xc_is_shm(src));') … … 53 55 do { 54 56 ') 57 ifdef(`SIZEOF_$1', , `m4_errprint(`AUTOCHECK WARN: $1: missing structinfo, dont panic')') 55 58 56 59 ifdef(`USEMEMCPY', `IFCOPY(` … … 68 71 INDENT()fprintf(stderr, "}\n"); 69 72 ') 70 ifdef(`SKIPASSERT_ONCE', `undefine(`SKIPASSERT_ONCE')', ` 73 ifdef(`SKIPASSERT_ONCE', ` 74 undefine(`SKIPASSERT_ONCE') 71 75 IFASSERT(` 72 /* {{{ check assert */ 76 zend_hash_destroy(&done_names); 77 ') 78 ', ` 79 IFASSERT(` 80 /* {{{ check assert */ do { 81 int name_check_errors = xc_check_names(__FILE__, __LINE__, "FUNC_NAME", assert_names, sizeof(assert_names) / sizeof(assert_names[0]), &done_names); 82 zend_hash_destroy(&done_names); 83 73 84 if (done_count != assert_count) { 74 85 fprintf(stderr … … 85 96 ); 86 97 } 87 if ( done_count != assert_count || done_size != assert_size) {98 if (name_check_errors || done_count != assert_count || done_size != assert_size) { 88 99 assert(0); 89 100 } 90 /* }}} */101 } while (0); /* }}} */ 91 102 ') 92 103 ifdef(`ELEMENTSOF_$1', `
Note: See TracChangeset
for help on using the changeset viewer.

