diff options
-rw-r--r-- | 14.patch | 732 | ||||
-rw-r--r-- | PHPINFO | 2 | ||||
-rw-r--r-- | REFLECTION | 2 | ||||
-rw-r--r-- | php-pggi.spec | 15 |
4 files changed, 8 insertions, 743 deletions
diff --git a/14.patch b/14.patch deleted file mode 100644 index bd7df9b..0000000 --- a/14.patch +++ /dev/null @@ -1,732 +0,0 @@ -From 83cc191b26bfd3fef2b6794500b66243632dd48d Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Tue, 8 Oct 2019 08:35:28 +0200 -Subject: [PATCH 1/5] fix -Werror=maybe-uninitialized - ---- - src/gdk/gpixbuf.c | 6 +++--- - src/gdk/gwindow.c | 6 +++--- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/src/gdk/gpixbuf.c b/src/gdk/gpixbuf.c -index 31d5e17..0aaf206 100755 ---- a/src/gdk/gpixbuf.c -+++ b/src/gdk/gpixbuf.c -@@ -120,9 +120,9 @@ GPIXBUF_METHOD(createFromFile){ - zend_throw_exception_ex(pggi_exception_get(), 0, "%s", error->message); - return; - } -- zval * new_pixbuf; -- ZVAL_OBJ(new_pixbuf, gpixbuf_ctor(gpixbuf_get_class_entry(), pix)); -- RETURN_ZVAL(new_pixbuf, 1, 0); -+ zval new_pixbuf; -+ ZVAL_OBJ(&new_pixbuf, gpixbuf_ctor(gpixbuf_get_class_entry(), pix)); -+ RETURN_ZVAL(&new_pixbuf, 1, 0); - } - - GPIXBUF_METHOD(getWidth){ -diff --git a/src/gdk/gwindow.c b/src/gdk/gwindow.c -index 4d245ff..d1a9966 100755 ---- a/src/gdk/gwindow.c -+++ b/src/gdk/gwindow.c -@@ -109,9 +109,9 @@ GDK_WINDOW_METHOD(createSimilarSurface){ - window_object = Z_GDK_GWINDOW_P(this); - cairo_surface_t * new = gdk_window_create_similar_surface(window_object->window_ptr->intern, content, width, height); - pc_exception(cairo_surface_status(new)); -- zval * new_surface; -- ZVAL_OBJ(new_surface, pc_surface_ctor(pc_surface_get_class_entry(), new, 1)); -- RETURN_ZVAL(new_surface, 1, 0); -+ zval new_surface; -+ ZVAL_OBJ(&new_surface, pc_surface_ctor(pc_surface_get_class_entry(), new, 1)); -+ RETURN_ZVAL(&new_surface, 1, 0); - } - - GDK_WINDOW_METHOD(drawFrame){ - -From aa902ae031c9f448b5bcd9f24bab3ef767a7ea67 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Tue, 8 Oct 2019 08:36:03 +0200 -Subject: [PATCH 2/5] fix -Werror=multistatement-macros - ---- - src/entries/gentry.c | 3 ++- - src/entries/gentrybuffer.c | 3 ++- - src/gdk/rgba.c | 3 ++- - src/menus/gmenuitem.c | 3 ++- - src/pango/context.c | 3 ++- - src/pango/fontdescription.c | 3 ++- - src/pango/layout.c | 3 ++- - src/selectors/gaboutdialog.c | 3 ++- - src/selectors/gfilechooserdialog.c | 3 ++- - src/text/gtextbuffer.c | 3 ++- - src/text/gtextiter.c | 3 ++- - src/toolbar/gtoolbar.c | 3 ++- - src/toolbar/gtoolbutton.c | 3 ++- - src/toolbar/gtoolitem.c | 3 ++- - src/tree/ggrid.c | 3 ++- - src/tree/gtreeselection.c | 3 ++- - src/tree/gtreeview.c | 3 ++- - src/tree/gtreeviewcolumn.c | 3 ++- - 18 files changed, 36 insertions(+), 18 deletions(-) - -diff --git a/src/entries/gentry.c b/src/entries/gentry.c -index a941325..5f73833 100755 ---- a/src/entries/gentry.c -+++ b/src/entries/gentry.c -@@ -235,8 +235,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gentry_write_property(zval *object, zval *member, zv - } - gtk_entry_set_buffer(e, ze_obj->buffer_ptr->intern); - std_object_handlers.write_property(object, member, value, cache_slot); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(gwidget_write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/entries/gentrybuffer.c b/src/entries/gentrybuffer.c -index 2296278..6560763 100755 ---- a/src/entries/gentrybuffer.c -+++ b/src/entries/gentrybuffer.c -@@ -251,8 +251,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gentry_buffer_write_property(zval *object, zval *mem - }else if(!strcmp(member_val, GENTRY_BUFFER_MAX_LENGTH)){ - convert_to_long(value); - gtk_entry_buffer_set_max_length(buffer, Z_LVAL_P(value)); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(std_object_handlers.write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/gdk/rgba.c b/src/gdk/rgba.c -index ab5c7b2..02f30b7 100755 ---- a/src/gdk/rgba.c -+++ b/src/gdk/rgba.c -@@ -186,8 +186,9 @@ PHP_WRITE_PROP_HANDLER_TYPE rgba_write_property(zval *object, zval *member, zval - if(tmp_d < 0 || tmp_d > 1) - zend_throw_exception_ex(pggi_exception_get(), 0, "the value should be between 0 and 1"); - c->color->alpha = tmp_d; -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(std_object_handlers.write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/menus/gmenuitem.c b/src/menus/gmenuitem.c -index 731f9b4..72a40c3 100755 ---- a/src/menus/gmenuitem.c -+++ b/src/menus/gmenuitem.c -@@ -191,8 +191,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gmenuitem_write_property(zval *object, zval *member, - w = tmp_obj->widget_ptr; - std_object_handlers.write_property(object, member, value, cache_slot); - gtk_menu_item_set_submenu(menu, w->intern); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(gcontainer_write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/pango/context.c b/src/pango/context.c -index 3f818b7..18e42fa 100755 ---- a/src/pango/context.c -+++ b/src/pango/context.c -@@ -308,8 +308,9 @@ PHP_WRITE_PROP_HANDLER_TYPE pp_context_write_property(zval *object, zval *member - return; - break; - } -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(std_object_handlers.write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/pango/fontdescription.c b/src/pango/fontdescription.c -index 722bd34..1682689 100755 ---- a/src/pango/fontdescription.c -+++ b/src/pango/fontdescription.c -@@ -304,8 +304,9 @@ PHP_WRITE_PROP_HANDLER_TYPE font_description_write_property(zval *object, zval * - return; - break; - } -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(std_object_handlers.write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/pango/layout.c b/src/pango/layout.c -index eefe135..ae20283 100755 ---- a/src/pango/layout.c -+++ b/src/pango/layout.c -@@ -185,8 +185,9 @@ PHP_WRITE_PROP_HANDLER_TYPE pp_layout_write_property(zval *object, zval *member, - }else if(!strcmp(member_val, LAYOUT_TEXT)){ - convert_to_string(value); - pango_layout_set_text(l->intern, Z_STRVAL_P(value), Z_STRLEN_P(value)); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(std_object_handlers.write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/selectors/gaboutdialog.c b/src/selectors/gaboutdialog.c -index 34bc1a5..a6159b8 100755 ---- a/src/selectors/gaboutdialog.c -+++ b/src/selectors/gaboutdialog.c -@@ -216,8 +216,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gabout_dialog_write_property(zval *object, zval *mem - }else if(!strcmp(member_val, GABOUT_DIALOG_WRAP_LICENSE)){ - convert_to_boolean(value); - gtk_about_dialog_set_wrap_license(dialog, GET_BOOL_FROM_ZVAL(value)); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(gwindow_write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/selectors/gfilechooserdialog.c b/src/selectors/gfilechooserdialog.c -index 2f9961f..387edf7 100755 ---- a/src/selectors/gfilechooserdialog.c -+++ b/src/selectors/gfilechooserdialog.c -@@ -230,8 +230,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gfile_chooser_dialog_write_property(zval *object, zv - }else if(!strcmp(member_val, GFILE_CHOOSER_DIALOG_SHOW_HIDDEN)){ - convert_to_boolean(value); - gtk_file_chooser_set_show_hidden(chooser, GET_BOOL_FROM_ZVAL(value)); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(gwindow_write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/text/gtextbuffer.c b/src/text/gtextbuffer.c -index 17e3725..fd9021d 100755 ---- a/src/text/gtextbuffer.c -+++ b/src/text/gtextbuffer.c -@@ -244,8 +244,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gtext_buffer_write_property(zval *object, zval *memb - if(!strcmp(member_val, GTEXT_BUFFER_TEXT)){ - convert_to_string(value); - gtk_text_buffer_set_text(buffer, Z_STRVAL_P(value), Z_STRLEN_P(value)); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(std_object_handlers.write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/text/gtextiter.c b/src/text/gtextiter.c -index 81253d1..963049f 100755 ---- a/src/text/gtextiter.c -+++ b/src/text/gtextiter.c -@@ -723,8 +723,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gtext_iter_write_property(zval *object, zval *member - }else if(!strcmp(member_val, GTEXT_ITER_VISIBLE_LINE_OFFSET)){ - convert_to_string(value); - gtk_text_iter_set_visible_line_offset(iter, Z_LVAL_P(value)); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(std_object_handlers.write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - - } -diff --git a/src/toolbar/gtoolbar.c b/src/toolbar/gtoolbar.c -index 3e5a669..b887274 100755 ---- a/src/toolbar/gtoolbar.c -+++ b/src/toolbar/gtoolbar.c -@@ -111,8 +111,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gtoolbar_write_property(zval *object, zval *member, - }else if(!strcmp(member_val, GTOOLBAR_SHOW_ARROW)){ - convert_to_boolean(value); - gtk_toolbar_set_show_arrow(GTK_TOOLBAR(w->intern), GET_BOOL_FROM_ZVAL(value)); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(gcontainer_write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/toolbar/gtoolbutton.c b/src/toolbar/gtoolbutton.c -index 76a5410..adb9341 100755 ---- a/src/toolbar/gtoolbutton.c -+++ b/src/toolbar/gtoolbutton.c -@@ -214,8 +214,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gtool_button_write_property(zval *object, zval *memb - w = tmp_widget->widget_ptr; - std_object_handlers.write_property(object, member, value, cache_slot); - gtk_tool_button_set_label_widget(GTK_TOOL_BUTTON(w->intern), w->intern); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(gcontainer_write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/toolbar/gtoolitem.c b/src/toolbar/gtoolitem.c -index 62bfa3e..324d252 100755 ---- a/src/toolbar/gtoolitem.c -+++ b/src/toolbar/gtoolitem.c -@@ -85,8 +85,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gtool_item_write_property(zval *object, zval *member - }else if(!strcmp(member_val, GTOOL_ITEM_EXPAND)){ - convert_to_boolean(value); - gtk_tool_item_set_expand(GTK_TOOL_ITEM(w->intern), GET_BOOL_FROM_ZVAL(value)); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(gcontainer_write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/tree/ggrid.c b/src/tree/ggrid.c -index 18cccc8..31aff45 100755 ---- a/src/tree/ggrid.c -+++ b/src/tree/ggrid.c -@@ -243,8 +243,9 @@ PHP_WRITE_PROP_HANDLER_TYPE ggrid_write_property(zval *object, zval *member, zva - }else if(!strcmp(member_val, GGRID_ROW_HOMOGENEOUS)){ - convert_to_boolean(value); - gtk_grid_set_row_homogeneous(GTK_GRID(w->intern), GET_BOOL_FROM_ZVAL(value)); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(gcontainer_write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/tree/gtreeselection.c b/src/tree/gtreeselection.c -index 1204153..7188968 100755 ---- a/src/tree/gtreeselection.c -+++ b/src/tree/gtreeselection.c -@@ -344,8 +344,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gtree_selection_write_property(zval *object, zval *m - zend_throw_exception_ex(pggi_exception_get(), 0, "the selection mode needs to be a SELECTION_*"); - break; - } -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(std_object_handlers.write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/tree/gtreeview.c b/src/tree/gtreeview.c -index 2ca9f78..bc73b68 100755 ---- a/src/tree/gtreeview.c -+++ b/src/tree/gtreeview.c -@@ -279,8 +279,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gtree_view_write_property(zval *object, zval *member - gtree_store_ptr w = tmp_model->tree_store_ptr; - std_object_handlers.write_property(object, member, value, cache_slot); - gtk_tree_view_set_model(view, GTK_TREE_MODEL(w->intern)); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(gcontainer_write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/tree/gtreeviewcolumn.c b/src/tree/gtreeviewcolumn.c -index a145088..2c96e9e 100755 ---- a/src/tree/gtreeviewcolumn.c -+++ b/src/tree/gtreeviewcolumn.c -@@ -314,8 +314,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gtree_view_column_write_property(zval *object, zval - }else if(!strcmp(member_val, GTREE_VIEW_COLUMN_ALIGNMENT)){ - convert_to_double(value); - gtk_tree_view_column_set_resizable(tree, Z_DVAL_P(value)); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(std_object_handlers.write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - - -From 1153d7c7b0d6975a0fa82b1f2737480f27f43cd9 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Tue, 8 Oct 2019 08:42:29 +0200 -Subject: [PATCH 3/5] fix -Werror=maybe-uninitialized - ---- - src/cairo/surface.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/cairo/surface.c b/src/cairo/surface.c -index fc7ba9c..d539744 100755 ---- a/src/cairo/surface.c -+++ b/src/cairo/surface.c -@@ -110,10 +110,10 @@ SURFACE_METHOD(createSimilar){ - cairo_surface_t * s = surface_object->surface_ptr->intern; - cairo_surface_t * new = cairo_surface_create_similar(s, content, width, height); - pc_exception(cairo_surface_status(s)); -- zval * new_surface; -- ZVAL_OBJ(new_surface, pc_surface_ctor(surface_object->std.ce, new, 1)); -+ zval new_surface; -+ ZVAL_OBJ(&new_surface, pc_surface_ctor(surface_object->std.ce, new, 1)); - pc_exception(cairo_surface_status(new)); -- RETURN_ZVAL(new_surface, 1, 0); -+ RETURN_ZVAL(&new_surface, 1, 0); - } - - - -From ad55ae13bf43747e871537255002b95a4462eeb2 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Tue, 8 Oct 2019 08:42:38 +0200 -Subject: [PATCH 4/5] fix -Werror=multistatement-macros - ---- - src/abstracts/gcontainer.c | 3 ++- - src/abstracts/gmenushell.c | 3 ++- - src/applications/gwindow.c | 3 ++- - src/buttons/gbutton.c | 3 ++- - src/cairo/context.c | 3 ++- - src/cairo/imagesurface.c | 2 +- - src/containers/gbox.c | 3 ++- - src/containers/gcombobox.c | 3 ++- - src/containers/gnotebook.c | 3 ++- - 9 files changed, 17 insertions(+), 9 deletions(-) - -diff --git a/src/abstracts/gcontainer.c b/src/abstracts/gcontainer.c -index e4eeefe..772266e 100755 ---- a/src/abstracts/gcontainer.c -+++ b/src/abstracts/gcontainer.c -@@ -139,8 +139,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gcontainer_write_property(zval *object, zval *member - if(!strcmp(member_val, GCONTAINER_BORDER_WIDTH)){ - convert_to_long(value); - gtk_container_set_border_width(GTK_CONTAINER(w->intern), Z_LVAL_P(value)); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(gwidget_write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/abstracts/gmenushell.c b/src/abstracts/gmenushell.c -index 3198dcf..45c50c9 100755 ---- a/src/abstracts/gmenushell.c -+++ b/src/abstracts/gmenushell.c -@@ -126,8 +126,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gmenushell_write_property(zval *object, zval *member - if(!strcmp(member_val, GMENUSHELL_TAKE_FOCUS)){ - convert_to_boolean(value); - gtk_menu_shell_set_take_focus(menu, GET_BOOL_FROM_ZVAL(value)); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(gcontainer_write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/applications/gwindow.c b/src/applications/gwindow.c -index 198ab5f..82aa924 100755 ---- a/src/applications/gwindow.c -+++ b/src/applications/gwindow.c -@@ -227,8 +227,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gwindow_write_property(zval *object, zval *member, z - }else if(!strcmp(member_val, GWINDOW_ACCEPT_FOCUS)){ - convert_to_boolean(value); - gtk_window_set_accept_focus(win, GET_BOOL_FROM_ZVAL(value)); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(gcontainer_write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/buttons/gbutton.c b/src/buttons/gbutton.c -index 7fc2ee8..c87a4c3 100755 ---- a/src/buttons/gbutton.c -+++ b/src/buttons/gbutton.c -@@ -185,8 +185,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gbutton_write_property(zval *object, zval *member, z - w = tmp_widget->widget_ptr; - std_object_handlers.write_property(object, member, value, cache_slot); - gtk_button_set_image(but, w->intern); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(gcontainer_write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/cairo/context.c b/src/cairo/context.c -index b62ae43..d598b53 100755 ---- a/src/cairo/context.c -+++ b/src/cairo/context.c -@@ -1119,8 +1119,9 @@ PHP_WRITE_PROP_HANDLER_TYPE pc_context_write_property(zval *object, zval *member - convert_to_double(value); - tmp_d = Z_DVAL_P(value); - cairo_set_line_width(c->intern, tmp_d); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(std_object_handlers.write_property(object, member, value, cache_slot)); -+ } - pc_exception(cairo_status(c->intern)); - PHP_WRITE_PROP_HANDLER_RETURN(value); - } -diff --git a/src/cairo/imagesurface.c b/src/cairo/imagesurface.c -index 5d7d94a..97ec0f5 100755 ---- a/src/cairo/imagesurface.c -+++ b/src/cairo/imagesurface.c -@@ -216,7 +216,7 @@ PHP_WRITE_PROP_HANDLER_TYPE pc_image_surface_write_property(zval *object, zval * - - convert_to_string(member); - char * member_val = Z_STRVAL_P(member);*/ -- PHP_WRITE_PROP_HANDLER_TYPE(pc_surface_write_property(object, member, value, cache_slot)); -+ PHP_WRITE_PROP_HANDLER_RETURN(pc_surface_write_property(object, member, value, cache_slot)); - } - - /********************************/ -diff --git a/src/containers/gbox.c b/src/containers/gbox.c -index ab4027a..0c06f33 100755 ---- a/src/containers/gbox.c -+++ b/src/containers/gbox.c -@@ -153,8 +153,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gbox_write_property(zval *object, zval *member, zval - }else if(!strcmp(member_val, GBOX_HOMOGENEOUS)){ - convert_to_boolean(value); - gtk_box_set_homogeneous(GTK_BOX(w->intern), GET_BOOL_FROM_ZVAL(value)); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(gcontainer_write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/containers/gcombobox.c b/src/containers/gcombobox.c -index e4c382b..c64fff1 100755 ---- a/src/containers/gcombobox.c -+++ b/src/containers/gcombobox.c -@@ -126,8 +126,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gcombo_box_write_property(zval *object, zval *member - if(!strcmp(member_val, GCOMBO_BOX_ACTIVE)){ - convert_to_long(value); - gtk_combo_box_set_active(menu, Z_LVAL_P(value)); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(gcontainer_write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - -diff --git a/src/containers/gnotebook.c b/src/containers/gnotebook.c -index f5d71ef..ac71bd3 100755 ---- a/src/containers/gnotebook.c -+++ b/src/containers/gnotebook.c -@@ -366,8 +366,9 @@ PHP_WRITE_PROP_HANDLER_TYPE gnotebook_write_property(zval *object, zval *member, - }else if(!strcmp(member_val, GNOTEBOOK_SHOW_TABS)){ - convert_to_boolean(value); - gtk_notebook_set_show_tabs(GTK_NOTEBOOK(w->intern), GET_BOOL_FROM_ZVAL(value)); -- }else -+ } else { - PHP_WRITE_PROP_HANDLER_RETURN(gcontainer_write_property(object, member, value, cache_slot)); -+ } - PHP_WRITE_PROP_HANDLER_RETURN(value); - } - - -From e6ab406cc39c016011889bdcd9feac1eaa9f74af Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Tue, 8 Oct 2019 08:56:41 +0200 -Subject: [PATCH 5/5] fix return without valie in non void function - ---- - src/buttons/gbutton.c | 2 +- - src/cairo/context.c | 6 +++--- - src/cairo/pattern_surface.c | 12 +++++++----- - src/menus/gmenuitem.c | 2 +- - src/pango/context.c | 6 +++--- - src/pango/fontdescription.c | 4 ++-- - src/pango/layout.c | 2 +- - src/toolbar/gtoolbutton.c | 4 ++-- - src/tree/gtreeview.c | 2 +- - 9 files changed, 21 insertions(+), 19 deletions(-) - -diff --git a/src/buttons/gbutton.c b/src/buttons/gbutton.c -index c87a4c3..59c9d51 100755 ---- a/src/buttons/gbutton.c -+++ b/src/buttons/gbutton.c -@@ -180,7 +180,7 @@ PHP_WRITE_PROP_HANDLER_TYPE gbutton_write_property(zval *object, zval *member, z - tmp_widget = Z_GWIDGET_P(value); - if(!tmp_widget){ - zend_throw_exception_ex(pggi_exception_get(), 0, "the image need to be an image"); -- return ; -+ PHP_WRITE_PROP_HANDLER_RETURN(NULL); - } - w = tmp_widget->widget_ptr; - std_object_handlers.write_property(object, member, value, cache_slot); -diff --git a/src/cairo/context.c b/src/cairo/context.c -index d598b53..c39b13f 100755 ---- a/src/cairo/context.c -+++ b/src/cairo/context.c -@@ -1085,7 +1085,7 @@ PHP_WRITE_PROP_HANDLER_TYPE pc_context_write_property(zval *object, zval *member - break; - default: - zend_throw_exception_ex(pggi_exception_get(), 0, "Can't change the lineCaps property, needs to be a Context::LINE_CAP_*"); -- return; -+ PHP_WRITE_PROP_HANDLER_RETURN(NULL); - break; - } - }else if(!strcmp(member_val, CONTEXT_LINE_JOIN)){ -@@ -1099,7 +1099,7 @@ PHP_WRITE_PROP_HANDLER_TYPE pc_context_write_property(zval *object, zval *member - break; - default: - zend_throw_exception_ex(pggi_exception_get(), 0, "Can't change the lineJoin property, needs to be a Context::LINE_JOIN_*"); -- return; -+ PHP_WRITE_PROP_HANDLER_RETURN(NULL); - break; - } - }else if(!strcmp(member_val, CONTEXT_FILL_RULE)){ -@@ -1112,7 +1112,7 @@ PHP_WRITE_PROP_HANDLER_TYPE pc_context_write_property(zval *object, zval *member - break; - default: - zend_throw_exception_ex(pggi_exception_get(), 0, "Can't change the fillRule property, needs to be a Context::FILL_RULE_*"); -- return; -+ PHP_WRITE_PROP_HANDLER_RETURN(NULL); - break; - } - }else if(!strcmp(member_val, CONTEXT_LINE_WIDTH)){ -diff --git a/src/cairo/pattern_surface.c b/src/cairo/pattern_surface.c -index 1ba7c1f..284b176 100755 ---- a/src/cairo/pattern_surface.c -+++ b/src/cairo/pattern_surface.c -@@ -70,7 +70,7 @@ static const zend_function_entry pc_pattern_surface_class_functions[] = { - }; - - --void pc_pattern_surface_write_property(zval *object, zval *member, zval *value, void **cache_slot){ -+PHP_WRITE_PROP_HANDLER_TYPE pc_pattern_surface_write_property(zval *object, zval *member, zval *value, void **cache_slot){ - ze_pattern_object * intern = Z_PATTERN_P(object); - pc_pattern_ptr c = intern->pattern_ptr; - long tmp_l; -@@ -89,16 +89,18 @@ void pc_pattern_surface_write_property(zval *object, zval *member, zval *value, - break; - default: - zend_throw_exception_ex(pggi_exception_get(), 0, "Can't change the extend property, needs to be a Pattern::EXTEND_*"); -- return; -+ PHP_WRITE_PROP_HANDLER_RETURN(NULL); - break; - } -- }else -- std_object_handlers.write_property(object, member, value, cache_slot); -+ } else { -+ PHP_WRITE_PROP_HANDLER_RETURN(std_object_handlers.write_property(object, member, value, cache_slot)); -+ } - break; - default: -- std_object_handlers.write_property(object, member, value, cache_slot); -+ PHP_WRITE_PROP_HANDLER_RETURN(std_object_handlers.write_property(object, member, value, cache_slot)); - } - pc_exception(cairo_pattern_status(c->intern)); -+ PHP_WRITE_PROP_HANDLER_RETURN(value); - } - - /********************************/ -diff --git a/src/menus/gmenuitem.c b/src/menus/gmenuitem.c -index 72a40c3..150db6a 100755 ---- a/src/menus/gmenuitem.c -+++ b/src/menus/gmenuitem.c -@@ -186,7 +186,7 @@ PHP_WRITE_PROP_HANDLER_TYPE gmenuitem_write_property(zval *object, zval *member, - tmp_obj = Z_GWIDGET_P(value); - if(!tmp_obj){ - zend_throw_exception_ex(pggi_exception_get(), 0, "the submenu need to be a widget"); -- return ; -+ PHP_WRITE_PROP_HANDLER_RETURN(NULL); - } - w = tmp_obj->widget_ptr; - std_object_handlers.write_property(object, member, value, cache_slot); -diff --git a/src/pango/context.c b/src/pango/context.c -index 18e42fa..5263308 100755 ---- a/src/pango/context.c -+++ b/src/pango/context.c -@@ -275,7 +275,7 @@ PHP_WRITE_PROP_HANDLER_TYPE pp_context_write_property(zval *object, zval *member - break; - default: - zend_throw_exception_ex(pp_exception_get(), 0, "Can't change the baseDir property, needs to be a Context::DIRECTION_*"); -- return; -+ PHP_WRITE_PROP_HANDLER_RETURN(NULL); - break; - } - }else if(!strcmp(member_val, CONTEXT_BASE_GRAVITY)){ -@@ -291,7 +291,7 @@ PHP_WRITE_PROP_HANDLER_TYPE pp_context_write_property(zval *object, zval *member - break; - default: - zend_throw_exception_ex(pp_exception_get(), 0, "Can't change the baseGravity property, needs to be a Context::GRAVITY_*"); -- return; -+ PHP_WRITE_PROP_HANDLER_RETURN(NULL); - break; - } - }else if(!strcmp(member_val, CONTEXT_GRAVITY_HINT)){ -@@ -305,7 +305,7 @@ PHP_WRITE_PROP_HANDLER_TYPE pp_context_write_property(zval *object, zval *member - break; - default: - zend_throw_exception_ex(pp_exception_get(), 0, "Can't change the gravityHint property, needs to be a Context::GRAVITY_HINT_*"); -- return; -+ PHP_WRITE_PROP_HANDLER_RETURN(NULL); - break; - } - } else { -diff --git a/src/pango/fontdescription.c b/src/pango/fontdescription.c -index 1682689..a90e8a4 100755 ---- a/src/pango/fontdescription.c -+++ b/src/pango/fontdescription.c -@@ -283,7 +283,7 @@ PHP_WRITE_PROP_HANDLER_TYPE font_description_write_property(zval *object, zval * - break; - default: - zend_throw_exception_ex(pggi_exception_get(), 0, "Can't change the stretch property, needs to be a FontDescription::STRETCH_*"); -- return; -+ PHP_WRITE_PROP_HANDLER_RETURN(NULL); - break; - } - -@@ -301,7 +301,7 @@ PHP_WRITE_PROP_HANDLER_TYPE font_description_write_property(zval *object, zval * - break; - default: - zend_throw_exception_ex(pggi_exception_get(), 0, "Can't change the variant property, needs to be a FontDescription::VARIANT_*"); -- return; -+ PHP_WRITE_PROP_HANDLER_RETURN(NULL); - break; - } - } else { -diff --git a/src/pango/layout.c b/src/pango/layout.c -index ae20283..f302357 100755 ---- a/src/pango/layout.c -+++ b/src/pango/layout.c -@@ -179,7 +179,7 @@ PHP_WRITE_PROP_HANDLER_TYPE pp_layout_write_property(zval *object, zval *member, - break; - default: - zend_throw_exception_ex(pggi_exception_get(), 0, "Can't change the gravityHint property, needs to be a Context::GRAVITY_HINT_*"); -- return; -+ PHP_WRITE_PROP_HANDLER_RETURN(NULL); - break; - } - }else if(!strcmp(member_val, LAYOUT_TEXT)){ -diff --git a/src/toolbar/gtoolbutton.c b/src/toolbar/gtoolbutton.c -index adb9341..831f0bb 100755 ---- a/src/toolbar/gtoolbutton.c -+++ b/src/toolbar/gtoolbutton.c -@@ -200,7 +200,7 @@ PHP_WRITE_PROP_HANDLER_TYPE gtool_button_write_property(zval *object, zval *memb - tmp_widget = Z_GWIDGET_P(value); - if(!tmp_widget){ - zend_throw_exception_ex(pggi_exception_get(), 0, "the icon needs to be a widget"); -- return ; -+ PHP_WRITE_PROP_HANDLER_RETURN(NULL); - } - w = tmp_widget->widget_ptr; - std_object_handlers.write_property(object, member, value, cache_slot); -@@ -209,7 +209,7 @@ PHP_WRITE_PROP_HANDLER_TYPE gtool_button_write_property(zval *object, zval *memb - tmp_widget = Z_GWIDGET_P(value); - if(!tmp_widget){ - zend_throw_exception_ex(pggi_exception_get(), 0, "the label needs to be a widget"); -- return ; -+ PHP_WRITE_PROP_HANDLER_RETURN(NULL); - } - w = tmp_widget->widget_ptr; - std_object_handlers.write_property(object, member, value, cache_slot); -diff --git a/src/tree/gtreeview.c b/src/tree/gtreeview.c -index bc73b68..aa2ad61 100755 ---- a/src/tree/gtreeview.c -+++ b/src/tree/gtreeview.c -@@ -274,7 +274,7 @@ PHP_WRITE_PROP_HANDLER_TYPE gtree_view_write_property(zval *object, zval *member - ze_gtree_store_object * tmp_model = Z_GTREE_STORE_P(value); - if(!tmp_model){ - zend_throw_exception_ex(pggi_exception_get(), 0, "that need to be a widget"); -- return ; -+ PHP_WRITE_PROP_HANDLER_RETURN(NULL); - } - gtree_store_ptr w = tmp_model->tree_store_ptr; - std_object_handlers.write_property(object, member, value, cache_slot); @@ -2,6 +2,6 @@ pggi PGGI => enabled -PGGI version => 0.4.0 +PGGI version => 0.4.1 Gtk compilation version => 3.24.1 Gtk runtime version => 3.24.1 @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #199 pggi version 0.4.0 ] { +Extension [ <persistent> extension #199 pggi version 0.4.1 ] { - Constants [120] { Constant [ integer PGGI\BASELINE_POSITION_TOP ] { 0 } diff --git a/php-pggi.spec b/php-pggi.spec index 374cc6c..6566deb 100644 --- a/php-pggi.spec +++ b/php-pggi.spec @@ -8,7 +8,7 @@ # %{?scl: %scl_package php-pggi} -%global gh_commit e7ccc179b142ded3746ca75f912f4c5f3eba0a89 +%global gh_commit 031d42c22b4a346c87bad4bf84bc2a29ba67f7fe %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner Letargie %global gh_project pggi @@ -17,16 +17,13 @@ Summary: GTK bindings Name: %{?scl_prefix}php-pggi -Version: 0.4.0 +Version: 0.4.1 Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: BSD Group: Development/Languages URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz -# https://github.com/Letargie/pggi/pull/14 -Patch0: https://patch-diff.githubusercontent.com/raw/Letargie/pggi/pull/14.patch - BuildRequires: %{?dtsprefix}gcc BuildRequires: gtk3-devel BuildRequires: %{?scl_prefix}php-devel > 7 @@ -84,10 +81,6 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO mv %{gh_project}-%{gh_commit} NTS cd NTS -%patch0 -p1 -b .pr14 -find src/ -name \*.c -exec chmod -x {} \; -find src/ -name \*.h -exec chmod -x {} \; - # Sanity check, really often broken extver=$(sed -n '/#define PGGI_VERSION/{s/.* "//;s/".*$//;p}' src/pggi.h) if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then @@ -176,6 +169,10 @@ cd ../ZTS %changelog +* Wed Oct 9 2019 Remi Collet <remi@remirepo.net> - 0.4.1-1 +- update to 0.4.1 +- drop patches merged upstream + * Tue Oct 8 2019 Remi Collet <remi@remirepo.net> - 0.4.0-1 - update to 0.4.0 - drop patches merged upstream |