Changeset 299 for trunk

Show
Ignore:
Timestamp:
03/17/2008 10:02:26 (8 months ago)
Author:
indeyets
Message:

lines should start from 1

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ext/php/phpext.c

    r298 r299  
    284284 
    285285                                if (Z_TYPE_P(o) != IS_BOOL) { 
    286                                         zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "!bool specified, but value \"%s\" (len=%d) is incorrect on line %d, col %d: '%s'", ptr, len, p->linect, p->cursor - p->lineptr, p->lineptr); 
     286                                        zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "!bool specified, but value \"%s\" (len=%d) is incorrect on line %d, col %d: '%s'", ptr, len, p->linect + 1, p->cursor - p->lineptr, p->lineptr); 
    287287                                } 
    288288                        } else if (strcmp(n->type_id, "int#hex") == 0) { 
     
    389389 
    390390                                if (FAILURE == zend_lookup_class_ex(classname, classname_len, 1, &ce TSRMLS_CC)) { 
    391                                         zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "Couldn't find %s class on line %d, col %d: '%s'", classname, p->linect, p->cursor - p->lineptr, p->lineptr); 
     391                                        zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "Couldn't find %s class on line %d, col %d: '%s'", classname, p->linect + 1, p->cursor - p->lineptr, p->lineptr); 
    392392                                        efree(classname); 
    393393                                        break; 
     
    395395 
    396396                                if (0 == instanceof_function_ex(*ce, zend_ce_serializable, 1 TSRMLS_CC)) { 
    397                                         zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "Class %s doesn't implement Serializable on line %d, col %d: '%s'", classname, p->linect, p->cursor - p->lineptr, p->lineptr); 
     397                                        zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "Class %s doesn't implement Serializable on line %d, col %d: '%s'", classname, p->linect + 1, p->cursor - p->lineptr, p->lineptr); 
    398398                                        efree(classname); 
    399399                                        break; 
     
    439439 
    440440                                if (FAILURE == zend_lookup_class_ex(classname, classname_len, 1, &ce TSRMLS_CC)) { 
    441                                         zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "Couldn't find %s class on line %d, col %d: '%s'", classname, p->linect, p->cursor - p->lineptr, p->lineptr); 
     441                                        zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "Couldn't find %s class on line %d, col %d: '%s'", classname, p->linect + 1, p->cursor - p->lineptr, p->lineptr); 
    442442                                        efree(classname); 
    443443                                        break; 
     
    466466                                        } 
    467467                                } else { 
    468                                         zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "Class %s doesn't implement ArrayAccess on line %d, col %d: '%s'", classname, p->linect, p->cursor - p->lineptr, p->lineptr); 
     468                                        zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "Class %s doesn't implement ArrayAccess on line %d, col %d: '%s'", classname, p->linect + 1, p->cursor - p->lineptr, p->lineptr); 
    469469                                        efree(classname); 
    470470                                        break; 
     
    521521 
    522522                                if (FAILURE == zend_lookup_class_ex(classname, classname_len, 1, &ce TSRMLS_CC)) { 
    523                                         zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "Couldn't find %s class on line %d, col %d: '%s'", classname, p->linect, p->cursor - p->lineptr, p->lineptr); 
     523                                        zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "Couldn't find %s class on line %d, col %d: '%s'", classname, p->linect + 1, p->cursor - p->lineptr, p->lineptr); 
    524524                                        efree(classname); 
    525525                                        break; 
     
    527527 
    528528                                if (0 == instanceof_function_ex(*ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) { 
    529                                         zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "Class %s doesn't implement ArrayAccess on line %d, col %d: '%s'", classname, p->linect, p->cursor - p->lineptr, p->lineptr); 
     529                                        zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "Class %s doesn't implement ArrayAccess on line %d, col %d: '%s'", classname, p->linect + 1, p->cursor - p->lineptr, p->lineptr); 
    530530                                        efree(classname); 
    531531                                        break; 
     
    578578        res = syck_alloc_str(); 
    579579 
    580         zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "bad anchor \"%s\" on line %d, col %d", str, p->linect, p->cursor - p->lineptr - strlen(str)); 
     580        zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "bad anchor \"%s\" on line %d, col %d", str, p->linect + 1, p->cursor - p->lineptr - strlen(str)); 
    581581 
    582582        return res; 
     
    602602        endl[0] = '\0'; 
    603603 
    604         exc = zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "%s on line %d, col %d: '%s'", str, p->linect, p->cursor - p->lineptr, p->lineptr); 
     604        exc = zend_throw_exception_ex(syck_exception_entry, 0 TSRMLS_CC, "%s on line %d, col %d: '%s'", str, p->linect + 1, p->cursor - p->lineptr, p->lineptr); 
    605605        exc->refcount = 2; // hack 
    606606