Changeset 648
Legend:
- Unmodified
- Added
- Removed
-
trunk/processor/processor.m4
r645 r648 759 759 #ifdef E_STRICT 760 760 DEF_STRUCT_P_FUNC(`xc_compilererror_t', , `dnl {{{ 761 DISPATCH(int, type) 761 762 DISPATCH(uint, lineno) 762 763 DISPATCH(int, error_len) -
trunk/utils.c
r640 r648 539 539 sandbox = (xc_sandbox_t *) XG(sandbox); 540 540 assert(sandbox != NULL); 541 if (type != E_STRICT) { 541 switch (type) { 542 case E_STRICT: 543 #ifdef E_DEPRECATED 544 case E_DEPRECATED: 545 #endif 546 if (sandbox->compilererror_cnt <= sandbox->compilererror_size) { 547 if (sandbox->compilererror_size) { 548 sandbox->compilererror_size += 16; 549 sandbox->compilererrors = erealloc(sandbox->compilererrors, sandbox->compilererror_size * sizeof(sandbox->compilererrors)); 550 } 551 else { 552 sandbox->compilererror_size = 16; 553 sandbox->compilererrors = emalloc(sandbox->compilererror_size * sizeof(sandbox->compilererrors)); 554 } 555 } 556 compilererror = &sandbox->compilererrors[sandbox->compilererror_cnt++]; 557 compilererror->type = type; 558 compilererror->lineno = error_lineno; 559 compilererror->error_len = vspprintf(&compilererror->error, 0, format, args); 560 break; 561 562 default: { 542 563 /* give up, and user handler is not supported in this case */ 543 564 zend_uint i; … … 548 569 compilererror = &sandbox->compilererrors[i]; 549 570 CG(zend_lineno) = compilererror->lineno; 550 zend_error( E_STRICT, "%s", compilererror->error);571 zend_error(type, "%s", compilererror->error); 551 572 } 552 573 CG(zend_lineno) = orig_lineno; … … 554 575 555 576 sandbox->orig_zend_error_cb(type, error_filename, error_lineno, format, args); 556 return; 557 } 558 559 if (sandbox->compilererror_cnt <= sandbox->compilererror_size) { 560 if (sandbox->compilererror_size) { 561 sandbox->compilererror_size += 16; 562 sandbox->compilererrors = erealloc(sandbox->compilererrors, sandbox->compilererror_size * sizeof(sandbox->compilererrors)); 563 } 564 else { 565 sandbox->compilererror_size = 16; 566 sandbox->compilererrors = emalloc(sandbox->compilererror_size * sizeof(sandbox->compilererrors)); 567 } 568 } 569 compilererror = &sandbox->compilererrors[sandbox->compilererror_cnt++]; 570 compilererror->lineno = error_lineno; 571 compilererror->error_len = vspprintf(&compilererror->error, 0, format, args); 577 break; 578 } 579 } 572 580 } 573 581 /* }}} */ … … 817 825 xc_compilererror_t *error = &sandbox->compilererrors[i]; 818 826 CG(zend_lineno) = error->lineno; 819 zend_error( E_STRICT, "%s", error->error);827 zend_error(error->type, "%s", error->error); 820 828 } 821 829 CG(zend_lineno) = 0; -
trunk/xcache.c
r640 r648 753 753 xc_compilererror_t *error = &p->compilererrors[i]; 754 754 CG(zend_lineno) = error->lineno; 755 zend_error( E_STRICT, "%s", error->error);755 zend_error(error->type, "%s", error->error); 756 756 } 757 757 CG(zend_lineno) = 0; -
trunk/xcache.h
r609 r648 291 291 /* {{{ xc_compilererror_t */ 292 292 typedef struct { 293 int type; 293 294 uint lineno; 294 295 int error_len;
Note: See TracChangeset
for help on using the changeset viewer.

