Changeset 272 for trunk

Show
Ignore:
Timestamp:
08/09/2007 06:00:40 (16 months ago)
Author:
indeyets
Message:

gcc-2.95 compatibility patch (by Brian J. France)

Location:
trunk/ext/php
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/ext/php/CHANGELOG

    r268 r272  
    11--- %YAML:1.0 
     2- version: 0.9.2 
     3  date: 2007-08-?? 
     4  status: beta 
     5  changes: 
     6    - short-and-flat arrays are dumped using inline-mode now (for readability) 
     7    - gcc-2.95 compatibility (patch by Brian J. France) 
     8 
    29- version: 0.9.1 
    310  date: 2007-07-15 
  • trunk/ext/php/phpext.c

    r271 r272  
    202202                        } else if (strcmp(n->type_id, "bool") == 0) { 
    203203                                /* implicit boolean */ 
    204                                 TSRMLS_FETCH(); 
    205204                                char *ptr = n->data.str->ptr; 
    206205                                size_t len = n->data.str->len; 
     206                                TSRMLS_FETCH(); 
    207207 
    208208                                if (len == 1) { 
     
    238238                                } 
    239239                        } else if (strcmp(n->type_id, "int#hex") == 0) { 
     240                                long intVal; 
    240241                                syck_str_blow_away_commas(n); 
    241                                 long intVal = strtol(n->data.str->ptr, NULL, 16); 
     242                                intVal = strtol(n->data.str->ptr, NULL, 16); 
    242243                                ZVAL_LONG(o, intVal); 
    243244                        } else if (strcmp(n->type_id, "int#base60") == 0) { 
     
    268269                                ZVAL_LONG(o, total); 
    269270                        } else if (strcmp(n->type_id, "int#oct") == 0) { 
     271                                long intVal; 
    270272                                syck_str_blow_away_commas(n); 
    271                                 long intVal = strtol(n->data.str->ptr, NULL, 8); 
     273                                intVal = strtol(n->data.str->ptr, NULL, 8); 
    272274                                ZVAL_LONG(o, intVal); 
    273275                        } else if (strcmp(n->type_id, "int") == 0) { 
     276                                long intVal; 
    274277                                syck_str_blow_away_commas(n); 
    275                                 long intVal = strtol(n->data.str->ptr, NULL, 10); 
     278                                intVal = strtol(n->data.str->ptr, NULL, 10); 
    276279                                ZVAL_LONG(o, intVal); 
    277280                        } else if (strcmp(n->type_id, "float") == 0 || strcmp(n->type_id, "float#fix") == 0 || strcmp(n->type_id, "float#exp") == 0) { 
     
    314317                                ZVAL_DOUBLE(o, -inf()); 
    315318                        } else if (strncmp(n->type_id, "timestamp", 9) == 0) { 
     319                                zval fname, param, *params[1]; 
    316320                                TSRMLS_FETCH(); 
    317                                 zval fname, param, *params[1]; 
    318321 
    319322                                ZVAL_STRING(&fname, "date_create", 1); 
     
    380383SyckNode * php_syck_badanchor_handler(SyckParser *p, char *str) 
    381384{ 
    382         TSRMLS_FETCH(); 
    383385        SyckNode *res; 
    384386        char *endl = p->cursor; 
     387        TSRMLS_FETCH(); 
    385388 
    386389        while (*endl != '\0' && *endl != '\n') 
     
    533536                case IS_OBJECT: 
    534537                { 
    535                         TSRMLS_FETCH(); 
    536538                        char *name; 
    537539                        zend_uint name_len; 
    538                         zend_class_entry *ce = Z_OBJCE_P(data); 
    539  
     540                        zend_class_entry *ce; 
     541                        TSRMLS_FETCH(); 
     542 
     543                        ce = Z_OBJCE_P(data); 
    540544                        zend_get_object_classname(data, &name, &name_len TSRMLS_CC); 
    541545