Changeset 3143 for libcaca/trunk/caca-php/php_caca.c
- Timestamp:
- Oct 30, 2008, 1:51:55 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca-php/php_caca.c
r3142 r3143 688 688 689 689 PHP_FUNCTION(caca_attr_to_argb64) { 690 //TODO: write or delete 690 691 } 691 692 692 693 PHP_FUNCTION(caca_utf8_to_utf32) { 694 //TODO: write or delete 693 695 } 694 696 695 697 PHP_FUNCTION(caca_utf32_to_utf8) { 698 //TODO: write or delete 696 699 } 697 700 … … 797 800 tbl_x = malloc(sizeof(int) * lenmax); 798 801 tbl_y = malloc(sizeof(int) * lenmax); 802 803 if (!tbl_x || !tbl_y) { 804 RETURN_FALSE; 805 } 799 806 800 807 HashPosition pos; … … 1041 1048 int i, j; 1042 1049 for (i = 0; i < 256; i++) { 1043 if (zend_hash_index_find(Z_ARRVAL_P(arr), i, (void**) &color) == FAILURE | Z_TYPE_P(*color) != IS_ARRAY) {1050 if (zend_hash_index_find(Z_ARRVAL_P(arr), i, (void**) &color) == FAILURE || Z_TYPE_P(*color) != IS_ARRAY) { 1044 1051 RETURN_FALSE; 1045 1052 } … … 1065 1072 1066 1073 gdImage *img = fetch_external_resource(_zval2, "gd"); 1067 if (!img | img->trueColor| gdMaxColors != 256) {1074 if (!img || img->trueColor || gdMaxColors != 256) { 1068 1075 RETURN_FALSE; 1069 1076 } … … 1157 1164 1158 1165 PHP_FUNCTION(caca_get_dither_antialias_list) { 1166 //TODO: write 1159 1167 } 1160 1168 … … 1362 1370 1363 1371 PHP_FUNCTION(caca_render_canvas) { 1372 //TODO: write 1364 1373 } 1365 1374 … … 1547 1556 buffer = caca_export_memory(canvas, type, &len); 1548 1557 copy = emalloc(len); 1549 if (!buffer | !copy) {1558 if (!buffer || !copy) { 1550 1559 RETURN_FALSE; 1551 1560 }
Note: See TracChangeset
for help on using the changeset viewer.