Changeset 3260


Ignore:
Timestamp:
11/04/08 01:39:40 (5 years ago)
Author:
bsittler
Message:

fix typo in PHP binding of caca_set_Attr that caused segfault on linux; also remove workaround for spurious extra-argument requirement from two of the PHP examples

Location:
libcaca/trunk/caca-php
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca-php/examples/colors.php

    r3229 r3260  
    4646caca_set_color_ansi($cv, CACA_LIGHTGRAY, CACA_BLACK); 
    4747caca_put_str($cv, 3, 20, "This is bold    This is blink    This is italics    This is underline"); 
    48 caca_set_attr($cv, CACA_BOLD, CACA_DEFAULT); 
     48caca_set_attr($cv, CACA_BOLD); 
    4949caca_put_str($cv, 3 + 8, 20, "bold"); 
    50 caca_set_attr($cv, CACA_BLINK, CACA_DEFAULT); 
     50caca_set_attr($cv, CACA_BLINK); 
    5151caca_put_str($cv, 3 + 24, 20, "blink"); 
    52 caca_set_attr($cv, CACA_ITALICS, CACA_DEFAULT); 
     52caca_set_attr($cv, CACA_ITALICS); 
    5353caca_put_str($cv, 3 + 41, 20, "italics"); 
    54 caca_set_attr($cv, CACA_UNDERLINE, CACA_DEFAULT); 
     54caca_set_attr($cv, CACA_UNDERLINE); 
    5555caca_put_str($cv, 3 + 60, 20, "underline"); 
    5656 
  • libcaca/trunk/caca-php/examples/export.php

    r3245 r3260  
    112112        caca_put_str($cv, WIDTH / 2 - 5, HEIGHT / 2 + 4, "(\") \\o/ <&>"); 
    113113 
    114         caca_set_attr($cv, CACA_BOLD, CACA_DEFAULT); 
     114        caca_set_attr($cv, CACA_BOLD); 
    115115        caca_put_str($cv, WIDTH / 2 - 16, HEIGHT / 2 + 3, "Bold"); 
    116         caca_set_attr($cv, CACA_BLINK, CACA_DEFAULT); 
     116        caca_set_attr($cv, CACA_BLINK); 
    117117        caca_put_str($cv, WIDTH / 2 - 9, HEIGHT / 2 + 3, "Blink"); 
    118         caca_set_attr($cv, CACA_ITALICS, CACA_DEFAULT); 
     118        caca_set_attr($cv, CACA_ITALICS); 
    119119        caca_put_str($cv, WIDTH / 2 - 1, HEIGHT / 2 + 3, "Italics"); 
    120         caca_set_attr($cv, CACA_UNDERLINE, CACA_DEFAULT); 
     120        caca_set_attr($cv, CACA_UNDERLINE); 
    121121        caca_put_str($cv, WIDTH / 2 + 8, HEIGHT / 2 + 3, "Underline"); 
    122         caca_set_attr($cv, 0, CACA_DEFAULT); 
     122        caca_set_attr($cv, 0); 
    123123 
    124124        caca_set_color_ansi($cv, CACA_WHITE, CACA_LIGHTBLUE); 
  • libcaca/trunk/caca-php/php_caca.c

    r3188 r3260  
    645645        zval *_zval; 
    646646        long attr = 0; 
    647         if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rll", &_zval, &attr) == FAILURE) { 
     647        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &_zval, &attr) == FAILURE) { 
    648648                RETURN_FALSE; 
    649649        } 
Note: See TracChangeset for help on using the changeset viewer.