Changeset 3511 for libcaca/trunk


Ignore:
Timestamp:
May 22, 2009, 3:22:57 PM (10 years ago)
Author:
Sam Hocevar
Message:

Fix import/export related stuff I forgot to update in the Ruby and PHP bindings.

Location:
libcaca/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca-php/php_caca.c

    r3334 r3511  
    15511551        caca_file_read(file, buffer, len);
    15521552
    1553         RETURN_STRINGL(buffer, len, 1cac);
     1553        RETURN_STRINGL(buffer, len, 1);
    15541554}
    15551555
     
    16091609        ZEND_FETCH_RESOURCE(canvas, caca_canvas_t*, &_zval, -1, PHP_CACA_CANVAS_RES_NAME, le_caca_canvas);
    16101610
    1611         RETURN_LONG(caca_import_memory(canvas, src, src_len, format));
     1611        RETURN_LONG(caca_import_canvas_from_memory(canvas, src, src_len, format));
    16121612}
    16131613
     
    16221622        ZEND_FETCH_RESOURCE(canvas, caca_canvas_t*, &_zval, -1, PHP_CACA_CANVAS_RES_NAME, le_caca_canvas);
    16231623
    1624         RETURN_LONG(caca_import_file(canvas, filename, format));
     1624        RETURN_LONG(caca_import_canvas_from_file(canvas, filename, format));
    16251625}
    16261626
     
    16481648        void *buffer;
    16491649        size_t len = 0;
    1650         buffer = caca_export_memory(canvas, type, &len);
     1650        buffer = caca_export_canvas_to_memory(canvas, type, &len);
    16511651        if (!buffer) {
    16521652                RETURN_FALSE;
  • libcaca/trunk/ruby/ruby-caca.dox

    r3473 r3511  
    5757"draw_line","draw_polyline", "draw_thin_box", "draw_thin_ellipse",
    5858"draw_thin_line","draw_thin_polyline", "draw_thin_triangle",
    59 "draw_triangle","export_memory", "fill_box", "fill_ellipse",
     59"draw_triangle","export_to_memory", "fill_box", "fill_ellipse",
    6060"fill_triangle","flip", "flop", "frame=", "frame_count", "frame_name",
    6161"frame_name=","free_frame", "get_attr", "get_char", "gotoxy",
    6262"handle_x","handle_y", "height", "height=", "import_file",
    63 "import_memory","invert", "printf", "put_attr", "put_char", "put_str",
     63"import_from_memory","invert", "printf", "put_attr", "put_char", "put_str",
    6464"rotate_180","rotate_left", "rotate_right", "set_attr",
    6565"set_boundaries","set_color_ansi", "set_color_argb", "set_frame",
     
    123123$ruby -rcaca -e 'c=Caca::Canvas.new(6, 3).fill_box(0,0,2,2,"#"[0]);
    124124c2=Caca::Canvas.new(1,1).put_str(0,0,"x"); c.blit(1,1,c2); puts
    125 c.export_memory("irc")'
     125c.export_to_memory("irc")'
    126126###
    127127#x#
     
    131131\code
    132132$ruby -e 'puts Caca::Canvas.new(6,3).draw_thin_polyline([[0,0], [0,2],
    133 [5,2],[0,0]]).export_memory("irc")'
     133[5,2],[0,0]]).export_to_memory("irc")'
    134134-.
    135135| `.
  • libcaca/trunk/ruby/t/tc_canvas.rb

    r2825 r3511  
    2727    end
    2828    def test_import
    29         @c.import_memory("foo", "")
    30         assert_equal("foo\r\n", @c.export_memory("irc"), "Import/Export failed")
     29        @c.import_from_memory("foo", "")
     30        assert_equal("foo\r\n", @c.export_to_memory("irc"), "Import/Export failed")
    3131    end
    3232    def test_cursor
     
    3838        @c.put_char(1, 1, 64)
    3939        @c.clear
    40         assert_equal("", @c.export_memory("irc").strip, "Failed to clear canvas")
     40        assert_equal("", @c.export_to_memory("irc").strip, "Failed to clear canvas")
    4141    end
    4242    def test_char
Note: See TracChangeset for help on using the changeset viewer.