summaryrefslogtreecommitdiffhomepage
path: root/php_imlib.c
diff options
context:
space:
mode:
authorPiotr Pawłow <pp@siedziba.pl>2024-09-13 04:57:41 +0200
committerPiotr Pawłow <pp@siedziba.pl>2024-09-13 04:57:41 +0200
commit23eb0f6fe13957dd5d2c5db1e91788cef506c2be (patch)
tree353ddfd11c51f48d0af3df94078d966d621ecc81 /php_imlib.c
parent65a83f856294ab495352f562bce343237942117b (diff)
Remove all TSRMLS_* macro calls
Diffstat (limited to 'php_imlib.c')
-rw-r--r--php_imlib.c164
1 files changed, 79 insertions, 85 deletions
diff --git a/php_imlib.c b/php_imlib.c
index 375eeed..270c5e9 100644
--- a/php_imlib.c
+++ b/php_imlib.c
@@ -264,7 +264,7 @@ ZEND_RSRC_DTOR_FUNC(_php_imlib_free_poly)
imlib_polygon_free(res->ptr);
}
-void _php_imlib_set_cache_size(int size TSRMLS_DC)
+void _php_imlib_set_cache_size(int size)
{
if (size>IMLIBG(max_cache_size)) {
size=IMLIBG(max_cache_size);
@@ -349,7 +349,7 @@ void _php_imlib_unload_filter(struct php_imlib_filter* ptr)
free(ptr);
}
-void _php_imlib_unload_filters(TSRMLS_D)
+void _php_imlib_unload_filters(void)
{
struct php_imlib_filter* f_ptr;
@@ -366,7 +366,7 @@ void _php_imlib_unload_filters(TSRMLS_D)
lt_dlexit();
}
-void _php_imlib_load_filters(TSRMLS_D)
+void _php_imlib_load_filters(void)
{
struct php_imlib_filter* f_ptr;
char* path;
@@ -460,7 +460,7 @@ error:
#ifdef IMLIB_DEBUG
ID_PRINTF("Error loading filters!");
#endif
- _php_imlib_unload_filters(TSRMLS_C);
+ _php_imlib_unload_filters();
cleanup:
if (names!=NULL)
{
@@ -473,12 +473,12 @@ cleanup:
if (dirp!=NULL) closedir(dirp);
}
-struct php_imlib_filter* _php_imlib_find_filter(char *filter_name TSRMLS_DC)
+struct php_imlib_filter* _php_imlib_find_filter(char *filter_name)
{
struct php_imlib_filter* f_ptr;
int i;
- _php_imlib_load_filters(TSRMLS_C);
+ _php_imlib_load_filters();
f_ptr=IMLIBG(filters);
while (f_ptr!=NULL)
{
@@ -497,7 +497,6 @@ struct php_imlib_filter* _php_imlib_find_filter(char *filter_name TSRMLS_DC)
Imlib_Image _php_imlib_get_image(zval* im_resource)
{
Imlib_Image im;
- TSRMLS_FETCH();
im = (Imlib_Image) zend_fetch_resource(Z_RES_P(im_resource), le_imlib_img_name, le_imlib_img);
return im;
}
@@ -505,7 +504,6 @@ Imlib_Image _php_imlib_get_image(zval* im_resource)
Imlib_Filter _php_imlib_get_filter(zval* fil_resource)
{
Imlib_Filter fil;
- TSRMLS_FETCH();
fil = (Imlib_Filter) zend_fetch_resource(Z_RES_P(fil_resource), le_imlib_filter_name, le_imlib_filter);
return fil;
}
@@ -534,7 +532,6 @@ void _php_imlib_color_modifier_synch(PHP_Imlib_Color_Modifier cm)
Imlib_Color_Modifier _php_imlib_get_cm(zval* cm_resource)
{
PHP_Imlib_Color_Modifier cm;
- TSRMLS_FETCH();
cm = (Imlib_Color_Modifier) zend_fetch_resource(Z_RES_P(cm_resource), le_imlib_cm_name, le_imlib_cm);
if (cm->modified) _php_imlib_color_modifier_synch(cm);
cm->valid=0;
@@ -544,7 +541,6 @@ Imlib_Color_Modifier _php_imlib_get_cm(zval* cm_resource)
Imlib_Font _php_imlib_get_font(zval* font_resource)
{
PHP_Imlib_Font php_font;
- TSRMLS_FETCH();
php_font = (PHP_Imlib_Font) zend_fetch_resource(Z_RES_P(font_resource), le_imlib_font_name, le_imlib_font);
return php_font->font;
}
@@ -552,7 +548,6 @@ Imlib_Font _php_imlib_get_font(zval* font_resource)
Imlib_Color_Range _php_imlib_get_cr(zval* cr_resource)
{
Imlib_Color_Range cr;
- TSRMLS_FETCH();
cr = (Imlib_Color_Range) zend_fetch_resource(Z_RES_P(cr_resource), le_imlib_cr_name, le_imlib_cr);
return cr;
}
@@ -560,7 +555,6 @@ Imlib_Color_Range _php_imlib_get_cr(zval* cr_resource)
ImlibPolygon _php_imlib_get_poly(zval* poly_resource)
{
ImlibPolygon poly;
- TSRMLS_FETCH();
poly = (ImlibPolygon) zend_fetch_resource(Z_RES_P(poly_resource), le_imlib_poly_name, le_imlib_poly);
return poly;
}
@@ -677,7 +671,7 @@ ZEND_MODULE_STARTUP_D(imlib)
PHP_MSHUTDOWN_FUNCTION(imlib)
{
- _php_imlib_unload_filters(TSRMLS_C);
+ _php_imlib_unload_filters();
UNREGISTER_INI_ENTRIES();
@@ -691,7 +685,7 @@ PHP_RINIT_FUNCTION(imlib)
int i, font_count;
/* Set default cache size */
- _php_imlib_set_cache_size(IMLIBG(cache_size) TSRMLS_CC);
+ _php_imlib_set_cache_size(IMLIBG(cache_size));
font_list = imlib_list_font_path(&font_count);
if (!font_count) {
IMLIBG(saved_path) = NULL;
@@ -737,7 +731,7 @@ PHP_RSHUTDOWN_FUNCTION(imlib)
int i, font_count;
/* Restore cache size */
- _php_imlib_set_cache_size(0 TSRMLS_CC);
+ _php_imlib_set_cache_size(0);
/* Retrieve the current path and clear it out. */
font_list = imlib_list_font_path(&font_count);
for (i = 0; i < font_count; i++) {
@@ -762,7 +756,7 @@ PHP_MINFO_FUNCTION(imlib)
struct php_imlib_filter* f_ptr;
int i;
- _php_imlib_load_filters(TSRMLS_C);
+ _php_imlib_load_filters();
f_ptr=IMLIBG(filters);
DISPLAY_INI_ENTRIES();
@@ -829,7 +823,7 @@ PHP_MINFO_FUNCTION(imlib)
}
static int _php_handle_cliprect_array(zval **dbox, char *func_name,
- int *x, int *y, int *w, int *h TSRMLS_DC)
+ int *x, int *y, int *w, int *h)
{
zval *element, **box_coords;
int i,arrcount;
@@ -946,7 +940,7 @@ static void _php_imlib_draw_something(INTERNAL_FUNCTION_PARAMETERS, void (*func)
Imlib_Image im;
argc = ZEND_NUM_ARGS();
- if (zend_parse_parameters(argc TSRMLS_CC, "rllllllll|a", &img, &x, &y, &w, &h, &r, &g, &b, &a, &dbox) == FAILURE) {
+ if (zend_parse_parameters(argc, "rllllllll|a", &img, &x, &y, &w, &h, &r, &g, &b, &a, &dbox) == FAILURE) {
return;
}
@@ -961,7 +955,7 @@ static void _php_imlib_draw_something(INTERNAL_FUNCTION_PARAMETERS, void (*func)
if (argc > 9)
{
- if (!_php_handle_cliprect_array(&dbox, func_name, &cx,&cy,&cw,&ch TSRMLS_CC))
+ if (!_php_handle_cliprect_array(&dbox, func_name, &cx,&cy,&cw,&ch))
RETURN_FALSE;
imlib_context_set_cliprect(cx,cy,cw,ch);
}
@@ -976,7 +970,7 @@ static void _php_imlib_single_arg(INTERNAL_FUNCTION_PARAMETERS, void (*func)())
zval *img;
Imlib_Image im;
- if (zend_parse_parameters(1 TSRMLS_CC, "r", &img) == FAILURE) return;
+ if (zend_parse_parameters(1, "r", &img) == FAILURE) return;
if ((im = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1001,7 +995,7 @@ PHP_FUNCTION(imlib_add_color_to_color_range)
zend_long x,r,g,b,a;
Imlib_Color_Range range;
- if (zend_parse_parameters(6 TSRMLS_CC, "rlllll", &crange, &x, &r, &g, &b, &a) == FAILURE) return;
+ if (zend_parse_parameters(6, "rlllll", &crange, &x, &r, &g, &b, &a) == FAILURE) return;
if ((range = (Imlib_Color_Range)zend_fetch_resource(Z_RES_P(crange), le_imlib_cr_name, le_imlib_cr)) == NULL)
RETURN_FALSE;
@@ -1022,7 +1016,7 @@ PHP_FUNCTION(imlib_blend_image_onto_image)
zend_long sx,sy,sw,sh,dx,dy,dw,dh;
zend_long calias, calpha, cblend, cdither;
- if (zend_parse_parameters(14 TSRMLS_CC, "rrllllllllllll", &dstimg, &srcimg, &calpha, &sx, &sy, &sw, &sh, &dx, &dy, &dw, &dh, &cdither, &cblend, &calias) == FAILURE) return;
+ if (zend_parse_parameters(14, "rrllllllllllll", &dstimg, &srcimg, &calpha, &sx, &sy, &sw, &sh, &dx, &dy, &dw, &dh, &cdither, &cblend, &calias) == FAILURE) return;
if ((src = (Imlib_Image)zend_fetch_resource(Z_RES_P(srcimg), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1046,7 +1040,7 @@ PHP_FUNCTION(imlib_clone_image)
zval *img;
Imlib_Image src,dst;
- if (zend_parse_parameters(1 TSRMLS_CC, "r", &img) == FAILURE) return;
+ if (zend_parse_parameters(1, "r", &img) == FAILURE) return;
if ((src = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1110,7 +1104,7 @@ PHP_FUNCTION(imlib_create_cropped_image)
zend_long sx,sy,sw,sh;
Imlib_Image src,dst;
- if (zend_parse_parameters(5 TSRMLS_CC, "rllll", &img, &sx, &sy, &sw, &sh) == FAILURE) return;
+ if (zend_parse_parameters(5, "rllll", &img, &sx, &sy, &sw, &sh) == FAILURE) return;
if ((src = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1131,7 +1125,7 @@ PHP_FUNCTION(imlib_create_cropped_scaled_image)
zend_long sx,sy,sw,sh,dw,dh;
Imlib_Image src,dst;
- if (zend_parse_parameters(7 TSRMLS_CC, "rllllll", &img, &sx, &sy, &sw, &sh, &dw, &dh) == FAILURE) return;
+ if (zend_parse_parameters(7, "rllllll", &img, &sx, &sy, &sw, &sh, &dw, &dh) == FAILURE) return;
if ((src = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1151,7 +1145,7 @@ PHP_FUNCTION(imlib_create_image)
Imlib_Image im;
zend_long x,y;
- if (zend_parse_parameters(2 TSRMLS_CC, "ll", &x, &y) == FAILURE) return;
+ if (zend_parse_parameters(2, "ll", &x, &y) == FAILURE) return;
im = imlib_create_image(x,y);
@@ -1178,7 +1172,7 @@ PHP_FUNCTION(imlib_create_rotated_image)
Imlib_Image src, dst;
argc = ZEND_NUM_ARGS();
- if (zend_parse_parameters(argc TSRMLS_CC, "rd|d", &srcimg, &angle, &radians) == FAILURE) return;
+ if (zend_parse_parameters(argc, "rd|d", &srcimg, &angle, &radians) == FAILURE) return;
if ((src = (Imlib_Image)zend_fetch_resource(Z_RES_P(srcimg), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1202,7 +1196,7 @@ PHP_FUNCTION(imlib_create_scaled_image)
long sw,sh,dw,dh;
Imlib_Image src,dst;
- if (zend_parse_parameters(3 TSRMLS_CC, "rzz", &img, &dstw, &dsth) == FAILURE) return;
+ if (zend_parse_parameters(3, "rzz", &img, &dstw, &dsth) == FAILURE) return;
if ((src = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1246,7 +1240,7 @@ PHP_FUNCTION(imlib_dump_image)
Imlib_Load_Error im_err;
argc = ZEND_NUM_ARGS();
- if (zend_parse_parameters(argc TSRMLS_CC, "r|zl", &img, &err, &q) == FAILURE) return;
+ if (zend_parse_parameters(argc, "r|zl", &img, &err, &q) == FAILURE) return;
if (argc > 1) {
zval_dtor(err);
@@ -1256,9 +1250,9 @@ PHP_FUNCTION(imlib_dump_image)
if ((im = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
- tmp = php_open_temporary_file("", "", &tmpfile TSRMLS_CC);
+ tmp = php_open_temporary_file("", "", &tmpfile);
if (tmp == NULL) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to open temporary file");
+ php_error_docref(NULL, E_WARNING, "Unable to open temporary file");
RETURN_FALSE;
}
@@ -1300,7 +1294,7 @@ PHP_FUNCTION(imlib_dump_image)
ap_bsetflag(php3_rqst->connection->client, B_EBCDIC2ASCII, 0);
#endif
while ((retval = fread(buf, 1, sizeof(buf), tmp)) > 0) {
- php_write(buf, retval TSRMLS_CC);
+ php_write(buf, retval);
}
fclose(tmp);
@@ -1320,7 +1314,7 @@ PHP_FUNCTION(imlib_free_color_range)
zval *fcr;
Imlib_Color_Range cr;
- if (zend_parse_parameters(1 TSRMLS_CC, "r", &fcr) == FAILURE) return;
+ if (zend_parse_parameters(1, "r", &fcr) == FAILURE) return;
if ((cr = (Imlib_Color_Range)zend_fetch_resource(Z_RES_P(fcr), le_imlib_cr_name, le_imlib_cr)) == NULL)
RETURN_FALSE;
@@ -1336,7 +1330,7 @@ PHP_FUNCTION(imlib_free_color_modifier)
zval *fcm;
PHP_Imlib_Color_Modifier cm;
- if (zend_parse_parameters(1 TSRMLS_CC, "r", &fcm) == FAILURE) return;
+ if (zend_parse_parameters(1, "r", &fcm) == FAILURE) return;
if ((cm = (Imlib_Color_Modifier)zend_fetch_resource(Z_RES_P(fcm), le_imlib_cm_name, le_imlib_cm)) == NULL)
RETURN_FALSE;
@@ -1351,7 +1345,7 @@ PHP_FUNCTION(imlib_free_font)
zval *font;
PHP_Imlib_Font fn;
- if (zend_parse_parameters(1 TSRMLS_CC, "r", &font) == FAILURE) return;
+ if (zend_parse_parameters(1, "r", &font) == FAILURE) return;
if ((fn = (PHP_Imlib_Font)zend_fetch_resource(Z_RES_P(font), le_imlib_font_name, le_imlib_font)) == NULL)
RETURN_FALSE;
@@ -1367,7 +1361,7 @@ PHP_FUNCTION(imlib_free_image)
zval *img;
Imlib_Image im;
- if (zend_parse_parameters(1 TSRMLS_CC, "r", &img) == FAILURE) return;
+ if (zend_parse_parameters(1, "r", &img) == FAILURE) return;
if ((im = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1388,7 +1382,7 @@ PHP_FUNCTION(imlib_get_text_advance)
int horiz_adv, vert_adv;
zend_long dir;
- if (zend_parse_parameters(5 TSRMLS_CC, "rszzl", &font, &text, &text_len, &thoriz_adv, &tvert_adv, &dir) == FAILURE) return;
+ if (zend_parse_parameters(5, "rszzl", &font, &text, &text_len, &thoriz_adv, &tvert_adv, &dir) == FAILURE) return;
if ((fn = (PHP_Imlib_Font)zend_fetch_resource(Z_RES_P(font), le_imlib_font_name, le_imlib_font)) == NULL)
RETURN_FALSE;
@@ -1417,7 +1411,7 @@ PHP_FUNCTION(imlib_get_text_size)
int w,h;
zend_long dir;
- if (zend_parse_parameters(5 TSRMLS_CC, "rszzl", &font, &text, &text_len, &tw, &th, &dir) == FAILURE) return;
+ if (zend_parse_parameters(5, "rszzl", &font, &text, &text_len, &tw, &th, &dir) == FAILURE) return;
if ((fn = (PHP_Imlib_Font)zend_fetch_resource(Z_RES_P(font), le_imlib_font_name, le_imlib_font)) == NULL)
RETURN_FALSE;
@@ -1443,7 +1437,7 @@ PHP_FUNCTION(imlib_image_blur)
zend_long r;
Imlib_Image im;
- if (zend_parse_parameters(2 TSRMLS_CC, "rl", &img, &r) == FAILURE) return;
+ if (zend_parse_parameters(2, "rl", &img, &r) == FAILURE) return;
if ((im = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1486,7 +1480,7 @@ PHP_FUNCTION(imlib_image_draw_polygon)
zend_bool closed;
argc = ZEND_NUM_ARGS();
- if (zend_parse_parameters(argc TSRMLS_CC, "rrbllll|a", &img, &polygon, &closed, &r, &g, &b, &a, &dbox) == FAILURE) return;
+ if (zend_parse_parameters(argc, "rrbllll|a", &img, &polygon, &closed, &r, &g, &b, &a, &dbox) == FAILURE) return;
if ((im = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1498,7 +1492,7 @@ PHP_FUNCTION(imlib_image_draw_polygon)
if (argc > 7)
{
- if (!_php_handle_cliprect_array(&dbox, "imlib_image_draw_polygon", &cx, &cy, &cw, &ch TSRMLS_CC))
+ if (!_php_handle_cliprect_array(&dbox, "imlib_image_draw_polygon", &cx, &cy, &cw, &ch))
RETURN_FALSE;
imlib_context_set_cliprect(cx,cy,cw,ch);
}
@@ -1531,7 +1525,7 @@ PHP_FUNCTION(imlib_image_fill_color_range_rectangle)
Imlib_Color_Range cr;
argc = ZEND_NUM_ARGS();
- if (zend_parse_parameters(argc TSRMLS_CC, "rrlllld|a", &fim, &fcr, &x, &y, &width, &height, &angle, &fbox) == FAILURE) return;
+ if (zend_parse_parameters(argc, "rrlllld|a", &fim, &fcr, &x, &y, &width, &height, &angle, &fbox) == FAILURE) return;
if ((cr = (Imlib_Color_Range)zend_fetch_resource(Z_RES_P(fcr), le_imlib_cr_name, le_imlib_cr)) == NULL)
RETURN_FALSE;
@@ -1543,7 +1537,7 @@ PHP_FUNCTION(imlib_image_fill_color_range_rectangle)
if (argc > 7)
{
- if (!_php_handle_cliprect_array(&fbox, "imlib_image_fill_color_range_rectangle", &cx,&cy,&cw,&ch TSRMLS_CC))
+ if (!_php_handle_cliprect_array(&fbox, "imlib_image_fill_color_range_rectangle", &cx,&cy,&cw,&ch))
RETURN_FALSE;
imlib_context_set_cliprect(cx,cy,cw,ch);
}
@@ -1576,7 +1570,7 @@ PHP_FUNCTION(imlib_image_fill_polygon)
ImlibPolygon poly;
argc = ZEND_NUM_ARGS();
- if (zend_parse_parameters(argc TSRMLS_CC, "rrllll|a", &img, &polygon, &r, &g, &b, &a, &dbox) == FAILURE) return;
+ if (zend_parse_parameters(argc, "rrllll|a", &img, &polygon, &r, &g, &b, &a, &dbox) == FAILURE) return;
if ((im = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1588,7 +1582,7 @@ PHP_FUNCTION(imlib_image_fill_polygon)
if (argc > 6)
{
- if (!_php_handle_cliprect_array(&dbox, "imlib_image_fill_polygon", &cx, &cy, &cw, &ch TSRMLS_CC))
+ if (!_php_handle_cliprect_array(&dbox, "imlib_image_fill_polygon", &cx, &cy, &cw, &ch))
RETURN_FALSE;
imlib_context_set_cliprect(cx,cy,cw,ch);
}
@@ -1648,7 +1642,7 @@ PHP_FUNCTION(imlib_image_orientate)
zend_long r;
Imlib_Image im;
- if (zend_parse_parameters(2 TSRMLS_CC, "rl", &img, &r) == FAILURE) return;
+ if (zend_parse_parameters(2, "rl", &img, &r) == FAILURE) return;
if ((im = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1667,7 +1661,7 @@ PHP_FUNCTION(imlib_image_format)
Imlib_Image im;
char *name;
- if (zend_parse_parameters(1 TSRMLS_CC, "r", &img) == FAILURE) return;
+ if (zend_parse_parameters(1, "r", &img) == FAILURE) return;
if ((im = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1690,7 +1684,7 @@ PHP_FUNCTION(imlib_image_get_filename)
Imlib_Image im;
const char *name = NULL;
- if (zend_parse_parameters(1 TSRMLS_CC, "r", &img) == FAILURE) return;
+ if (zend_parse_parameters(1, "r", &img) == FAILURE) return;
if ((im = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1713,7 +1707,7 @@ PHP_FUNCTION(imlib_image_get_height)
Imlib_Image im;
int height;
- if (zend_parse_parameters(1 TSRMLS_CC, "r", &img) == FAILURE) return;
+ if (zend_parse_parameters(1, "r", &img) == FAILURE) return;
if ((im = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1734,7 +1728,7 @@ PHP_FUNCTION(imlib_image_get_width)
Imlib_Image im;
int width;
- if (zend_parse_parameters(1 TSRMLS_CC, "r", &img) == FAILURE) return;
+ if (zend_parse_parameters(1, "r", &img) == FAILURE) return;
if ((im = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1754,7 +1748,7 @@ PHP_FUNCTION(imlib_image_has_alpha)
zval *img;
Imlib_Image im;
- if (zend_parse_parameters(1 TSRMLS_CC, "r", &img) == FAILURE) return;
+ if (zend_parse_parameters(1, "r", &img) == FAILURE) return;
if ((im = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1784,7 +1778,7 @@ PHP_FUNCTION(imlib_image_modify_alpha)
int i;
double ratio;
- if (zend_parse_parameters(2 TSRMLS_CC, "rl", &img, &malpha) == FAILURE) return;
+ if (zend_parse_parameters(2, "rl", &img, &malpha) == FAILURE) return;
if ((im = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1822,7 +1816,7 @@ PHP_FUNCTION(imlib_image_set_format)
char *format;
size_t format_len;
- if (zend_parse_parameters(2 TSRMLS_CC, "rs", &img, &format, &format_len) == FAILURE) return;
+ if (zend_parse_parameters(2, "rs", &img, &format, &format_len) == FAILURE) return;
if ((im = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1843,7 +1837,7 @@ PHP_FUNCTION(imlib_image_sharpen)
zend_long r;
Imlib_Image im;
- if (zend_parse_parameters(2 TSRMLS_CC, "rl", &img, &r) == FAILURE) return;
+ if (zend_parse_parameters(2, "rl", &img, &r) == FAILURE) return;
if ((im = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -1915,7 +1909,7 @@ PHP_FUNCTION(imlib_load_font)
PHP_Imlib_Font fn;
int argc;
- if (zend_parse_parameters(1 TSRMLS_CC, "s", &fontname, &fontname_len) == FAILURE) return;
+ if (zend_parse_parameters(1, "s", &fontname, &fontname_len) == FAILURE) return;
fn=(PHP_Imlib_Font)emalloc(sizeof(PHP_Imlib_Font_struct));
if (!fn) RETURN_FALSE;
@@ -1948,7 +1942,7 @@ PHP_FUNCTION(imlib_load_image)
size_t img_len;
argc = ZEND_NUM_ARGS();
- if (zend_parse_parameters(argc TSRMLS_CC, "s|z", &img, &img_len, &err) == FAILURE) return;
+ if (zend_parse_parameters(argc, "s|z", &img, &img_len, &err) == FAILURE) return;
if (argc == 2) {
zval_dtor(err);
@@ -1988,7 +1982,7 @@ PHP_FUNCTION(imlib_polygon_add_point)
zend_long x,y;
ImlibPolygon poly;
- if (zend_parse_parameters(3 TSRMLS_CC, "rll", &polygon, &x, &y) == FAILURE) return;
+ if (zend_parse_parameters(3, "rll", &polygon, &x, &y) == FAILURE) return;
if ((poly = (ImlibPolygon)zend_fetch_resource(Z_RES_P(polygon), le_imlib_poly_name, le_imlib_poly)) == NULL)
RETURN_FALSE;
@@ -2007,7 +2001,7 @@ PHP_FUNCTION(imlib_polygon_contains_point)
int ret;
ImlibPolygon poly;
- if (zend_parse_parameters(3 TSRMLS_CC, "rll", &polygon, &x, &y) == FAILURE) return;
+ if (zend_parse_parameters(3, "rll", &polygon, &x, &y) == FAILURE) return;
if ((poly = (ImlibPolygon)zend_fetch_resource(Z_RES_P(polygon), le_imlib_poly_name, le_imlib_poly)) == NULL)
RETURN_FALSE;
@@ -2033,7 +2027,7 @@ PHP_FUNCTION(imlib_polygon_free)
zval *polygon;
ImlibPolygon poly;
- if (zend_parse_parameters(1 TSRMLS_CC, "r", &polygon) == FAILURE) return;
+ if (zend_parse_parameters(1, "r", &polygon) == FAILURE) return;
if ((poly = (ImlibPolygon)zend_fetch_resource(Z_RES_P(polygon), le_imlib_poly_name, le_imlib_poly)) == NULL)
RETURN_FALSE;
@@ -2051,7 +2045,7 @@ PHP_FUNCTION(imlib_polygon_get_bounds)
int x1,y1,x2,y2;
ImlibPolygon poly;
- if (zend_parse_parameters(5 TSRMLS_CC, "rzzzz", &polygon, &px1, &py1, &px2, &py2) == FAILURE) return;
+ if (zend_parse_parameters(5, "rzzzz", &polygon, &px1, &py1, &px2, &py2) == FAILURE) return;
if ((poly = (ImlibPolygon)zend_fetch_resource(Z_RES_P(polygon), le_imlib_poly_name, le_imlib_poly)) == NULL)
RETURN_FALSE;
@@ -2102,7 +2096,7 @@ PHP_FUNCTION(imlib_save_image)
FILE* f;
argc = ZEND_NUM_ARGS();
- if (zend_parse_parameters(argc TSRMLS_CC, "rs|zl", &img, &name, &name_len, &err, &q) == FAILURE) return;
+ if (zend_parse_parameters(argc, "rs|zl", &img, &name, &name_len, &err, &q) == FAILURE) return;
if ((im = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -2154,7 +2148,7 @@ PHP_FUNCTION(imlib_text_draw)
size_t text_len;
zend_long x,y,dir,r,g,b,a;
- if (zend_parse_parameters(10 TSRMLS_CC, "rrllslllll", &img, &font, &x, &y, &text, &text_len, &dir, &r, &g, &b, &a) == FAILURE) return;
+ if (zend_parse_parameters(10, "rrllslllll", &img, &font, &x, &y, &text, &text_len, &dir, &r, &g, &b, &a) == FAILURE) return;
if ((im = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -2184,8 +2178,8 @@ PHP_FUNCTION(imlib_get_cache_size)
PHP_FUNCTION(imlib_set_cache_size)
{
zend_long size;
- if (zend_parse_parameters(1 TSRMLS_CC, "l", &size) == FAILURE) return;
- _php_imlib_set_cache_size(size TSRMLS_CC);
+ if (zend_parse_parameters(1, "l", &size) == FAILURE) return;
+ _php_imlib_set_cache_size(size);
RETURN_TRUE;
}
/* }}} */
@@ -2200,12 +2194,12 @@ PHP_FUNCTION(imlib_apply_filter)
char* filter_name;
size_t filter_name_len;
HashTable* arg_ht;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|a", &img, &filter_name, &filter_name_len, &tparams) == FAILURE) return;
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|a", &img, &filter_name, &filter_name_len, &tparams) == FAILURE) return;
if ((im = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
- filter = _php_imlib_find_filter(filter_name TSRMLS_CC);
+ filter = _php_imlib_find_filter(filter_name);
if (!filter) {
php_error(E_WARNING, "%s - Filter not found.", filter_name);
@@ -2250,7 +2244,7 @@ PHP_FUNCTION(imlib_free_filter)
zval *filter;
Imlib_Filter fil;
- if (zend_parse_parameters(1 TSRMLS_CC, "r", &filter) == FAILURE) return;
+ if (zend_parse_parameters(1, "r", &filter) == FAILURE) return;
if ((fil = (Imlib_Filter)zend_fetch_resource(Z_RES_P(filter), le_imlib_filter_name, le_imlib_filter)) == NULL)
RETURN_FALSE;
@@ -2266,7 +2260,7 @@ PHP_FUNCTION(imlib_image_filter)
Imlib_Filter fil;
Imlib_Image im;
- if (zend_parse_parameters(2 TSRMLS_CC, "rr", &img, &filter) == FAILURE) return;
+ if (zend_parse_parameters(2, "rr", &img, &filter) == FAILURE) return;
if ((im = (Imlib_Image)zend_fetch_resource(Z_RES_P(img), le_imlib_img_name, le_imlib_img)) == NULL)
RETURN_FALSE;
@@ -2286,7 +2280,7 @@ static void _php_imlib_filter_set(INTERNAL_FUNCTION_PARAMETERS, int type)
zend_long xoff,yoff,a,r,g,b;
Imlib_Filter fil;
- if (zend_parse_parameters(7 TSRMLS_CC, "rllllll", &filter, &xoff, &yoff, &a, &r, &g, &b) == FAILURE) return;
+ if (zend_parse_parameters(7, "rllllll", &filter, &xoff, &yoff, &a, &r, &g, &b) == FAILURE) return;
if ((fil = (Imlib_Filter)zend_fetch_resource(Z_RES_P(filter), le_imlib_filter_name, le_imlib_filter)) == NULL)
RETURN_FALSE;
@@ -2350,7 +2344,7 @@ PHP_FUNCTION(imlib_filter_constants)
zend_long a, r, g, b;
Imlib_Filter fil;
- if (zend_parse_parameters(5 TSRMLS_CC, "rllll", &filter, &a, &r, &g, &b) == FAILURE) return;
+ if (zend_parse_parameters(5, "rllll", &filter, &a, &r, &g, &b) == FAILURE) return;
if ((fil = (Imlib_Filter)zend_fetch_resource(Z_RES_P(filter), le_imlib_filter_name, le_imlib_filter)) == NULL)
RETURN_FALSE;
@@ -2368,7 +2362,7 @@ PHP_FUNCTION(imlib_filter_divisors)
zend_long a, r, g, b;
Imlib_Filter fil;
- if (zend_parse_parameters(5 TSRMLS_CC, "rllll", &filter, &a, &r, &g, &b) == FAILURE) return;
+ if (zend_parse_parameters(5, "rllll", &filter, &a, &r, &g, &b) == FAILURE) return;
if ((fil = (Imlib_Filter)zend_fetch_resource(Z_RES_P(filter), le_imlib_filter_name, le_imlib_filter)) == NULL)
RETURN_FALSE;
@@ -2388,7 +2382,7 @@ PHP_FUNCTION(imlib_modify_color_modifier_gamma)
zval *color_modifier;
PHP_Imlib_Color_Modifier cm;
- if (zend_parse_parameters(2 TSRMLS_CC, "rd", &color_modifier, &gamma) == FAILURE) return;
+ if (zend_parse_parameters(2, "rd", &color_modifier, &gamma) == FAILURE) return;
if ((cm = (PHP_Imlib_Color_Modifier)zend_fetch_resource(Z_RES_P(color_modifier), le_imlib_cm_name, le_imlib_cm)) == NULL)
RETURN_FALSE;
@@ -2409,7 +2403,7 @@ PHP_FUNCTION(imlib_modify_color_modifier_brightness)
zval *color_modifier;
PHP_Imlib_Color_Modifier cm;
- if (zend_parse_parameters(2 TSRMLS_CC, "rd", &color_modifier, &brightness) == FAILURE) return;
+ if (zend_parse_parameters(2, "rd", &color_modifier, &brightness) == FAILURE) return;
if ((cm = (PHP_Imlib_Color_Modifier)zend_fetch_resource(Z_RES_P(color_modifier), le_imlib_cm_name, le_imlib_cm)) == NULL)
RETURN_FALSE;
@@ -2430,7 +2424,7 @@ PHP_FUNCTION(imlib_modify_color_modifier_contrast)
zval *color_modifier;
PHP_Imlib_Color_Modifier cm;
- if (zend_parse_parameters(2 TSRMLS_CC, "rd", &color_modifier, &contrast) == FAILURE) return;
+ if (zend_parse_parameters(2, "rd", &color_modifier, &contrast) == FAILURE) return;
if ((cm = (PHP_Imlib_Color_Modifier)zend_fetch_resource(Z_RES_P(color_modifier), le_imlib_cm_name, le_imlib_cm)) == NULL)
RETURN_FALSE;
@@ -2450,7 +2444,7 @@ PHP_FUNCTION(imlib_reset_color_modifier)
zval *color_modifier;
PHP_Imlib_Color_Modifier cm;
- if (zend_parse_parameters(1 TSRMLS_CC, "r", &color_modifier) == FAILURE) return;
+ if (zend_parse_parameters(1, "r", &color_modifier) == FAILURE) return;
if ((cm = (PHP_Imlib_Color_Modifier)zend_fetch_resource(Z_RES_P(color_modifier), le_imlib_cm_name, le_imlib_cm)) == NULL)
RETURN_FALSE;
@@ -2473,7 +2467,7 @@ PHP_FUNCTION(imlib_apply_color_modifier)
int argc;
argc=ZEND_NUM_ARGS();
- if (zend_parse_parameters(argc TSRMLS_CC, "rr|llll", &image, &color_modifier, &x, &y, &width, &height) == FAILURE) return;
+ if (zend_parse_parameters(argc, "rr|llll", &image, &color_modifier, &x, &y, &width, &height) == FAILURE) return;
if ((cm = (PHP_Imlib_Color_Modifier)zend_fetch_resource(Z_RES_P(color_modifier), le_imlib_cm_name, le_imlib_cm)) == NULL)
RETURN_FALSE;
@@ -2503,7 +2497,7 @@ PHP_FUNCTION(imlib_set_color_modifier)
int argc,i=0;
argc=ZEND_NUM_ARGS();
- if (zend_parse_parameters(argc TSRMLS_CC, "rll|l", &color_modifier, &index, &value, &channels) == FAILURE) return;
+ if (zend_parse_parameters(argc, "rll|l", &color_modifier, &index, &value, &channels) == FAILURE) return;
if ((cm = (PHP_Imlib_Color_Modifier)zend_fetch_resource(Z_RES_P(color_modifier), le_imlib_cm_name, le_imlib_cm)) == NULL)
RETURN_FALSE;
if (!cm->valid) _php_imlib_color_modifier_synch(cm);
@@ -2529,7 +2523,7 @@ PHP_FUNCTION(imlib_get_color_modifier)
zend_long index;
PHP_Imlib_Color_Modifier cm;
- if (zend_parse_parameters(6 TSRMLS_CC, "rlzzzz", &color_modifier, &index, &tred, &tgreen, &tblue, &talpha) == FAILURE) return;
+ if (zend_parse_parameters(6, "rlzzzz", &color_modifier, &index, &tred, &tgreen, &tblue, &talpha) == FAILURE) return;
if ((cm = (PHP_Imlib_Color_Modifier)zend_fetch_resource(Z_RES_P(color_modifier), le_imlib_cm_name, le_imlib_cm)) == NULL)
RETURN_FALSE;
if (!cm->valid) _php_imlib_color_modifier_synch(cm);
@@ -2575,7 +2569,7 @@ PHP_FUNCTION(imlib_pstext)
argc=ZEND_NUM_ARGS();
- if (zend_parse_parameters(argc TSRMLS_CC, "rsrlllllll|lldl", &img, &str, &str_len, &fnt, &sz, &x, &y, &r, &g, &b, &a, &space, &width, &angle, &aa_steps) == FAILURE) return;
+ if (zend_parse_parameters(argc, "rsrlllllll|lldl", &img, &str, &str_len, &fnt, &sz, &x, &y, &r, &g, &b, &a, &space, &width, &angle, &aa_steps) == FAILURE) return;
color=(r<<16)|(g<<8)|b;
@@ -2688,7 +2682,7 @@ PHP_FUNCTION(imlib_psloadfont)
zend_string* filename;
FILE* f;
- if (zend_parse_parameters(1 TSRMLS_CC, "s", &file, &file_len) == FAILURE) return;
+ if (zend_parse_parameters(1, "s", &file, &file_len) == FAILURE) return;
f = php_stream_open_wrapper_as_file(file, "rb", IGNORE_PATH | REPORT_ERRORS, &filename);
if (f == NULL) RETURN_FALSE;
@@ -2738,7 +2732,7 @@ PHP_FUNCTION(imlib_psfreefont)
zval *fnt;
int *f_ind;
- if (zend_parse_parameters(1 TSRMLS_CC, "r", &fnt) == FAILURE) return;
+ if (zend_parse_parameters(1, "r", &fnt) == FAILURE) return;
if ((f_ind = (int *)zend_fetch_resource(Z_RES_P(fnt), le_ps_font_name, le_ps_font)) == NULL)
RETURN_FALSE;
@@ -2765,7 +2759,7 @@ PHP_FUNCTION(imlib_psencodefont)
zend_string* filename;
FILE* f;
- if (zend_parse_parameters(2 TSRMLS_CC, "rs", &fnt, &enc, &enc_len) == FAILURE) return;
+ if (zend_parse_parameters(2, "rs", &fnt, &enc, &enc_len) == FAILURE) return;
if ((f_ind = (int *)zend_fetch_resource(Z_RES_P(fnt), le_ps_font_name, le_ps_font)) == NULL)
RETURN_FALSE;
@@ -2807,7 +2801,7 @@ PHP_FUNCTION(imlib_psextendfont)
double ext;
int *f_ind;
- if (zend_parse_parameters(2 TSRMLS_CC, "rd", &fnt, &ext) == FAILURE) return;
+ if (zend_parse_parameters(2, "rd", &fnt, &ext) == FAILURE) return;
if ((f_ind = (int *)zend_fetch_resource(Z_RES_P(fnt), le_ps_font_name, le_ps_font)) == NULL)
RETURN_FALSE;
@@ -2831,7 +2825,7 @@ PHP_FUNCTION(imlib_psslantfont)
double slt;
int *f_ind;
- if (zend_parse_parameters(2 TSRMLS_CC, "rd", &fnt, &slt) == FAILURE) return;
+ if (zend_parse_parameters(2, "rd", &fnt, &slt) == FAILURE) return;
if ((f_ind = (int *)zend_fetch_resource(Z_RES_P(fnt), le_ps_font_name, le_ps_font)) == NULL)
RETURN_FALSE;
@@ -2862,7 +2856,7 @@ PHP_FUNCTION(imlib_psbbox)
double angle = 0, sin_a = 0, cos_a = 0;
BBox char_bbox, str_bbox = {0, 0, 0, 0};
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "srl|lld", &str, &str_len, &fnt, &sz, &space, &add_width, &angle) == FAILURE) return;
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "srl|lld", &str, &str_len, &fnt, &sz, &space, &add_width, &angle) == FAILURE) return;
angle = angle * M_PI / 180;
sin_a = sin(angle);
cos_a = cos(angle);