[gimp] libgimp: Fix issue #7387 luajit.exe crashes on Windows



commit d3e38ea4b9d1a8ddc5d92591390a64a3a940f782
Author: Jacob Boerema <jgboerema gmail com>
Date:   Fri Apr 15 18:48:33 2022 -0400

    libgimp: Fix issue #7387 luajit.exe crashes on Windows
    
    On Windows our Lua goat extension crashed when run. After some digging
    it appeared that incorrect annotations were the cause.
    The destroy annotation was clearly an error when loking at the gir API
    documentation. However, it also crashed on `(closure run_func)`, which
    seemed to be as it should.
    
    After comparing what other libraries do and testing, it seems that the
    documentation for (closure CLOSURE) is incorrect. See the discussion
    in the above mentioned issue.
    The correct use here seems to be to use it as annotation of the run_func
    where CLOSURE points to the user data. So, that's what we implement here.

 libgimp/gimpimageprocedure.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/libgimp/gimpimageprocedure.c b/libgimp/gimpimageprocedure.c
index b26a3d2ef2..55878fdc6e 100644
--- a/libgimp/gimpimageprocedure.c
+++ b/libgimp/gimpimageprocedure.c
@@ -225,16 +225,16 @@ gimp_image_procedure_set_sensitivity (GimpProcedure *procedure,
  * @plug_in:          a #GimpPlugIn.
  * @name:             the new procedure's name.
  * @proc_type:        the new procedure's #GimpPDBProcType.
- * @run_func:         the run function for the new procedure.
- * @run_data: (closure run_func): user data passed to @run_func.
- * @run_data_destroy: (destroy run_func) (nullable): free function for @run_data, or %NULL.
+ * @run_func:         (closure run_data) the run function for the new procedure.
+ * @run_data:         user data passed to @run_func.
+ * @run_data_destroy: (destroy run_data) (nullable): free function for @run_data, or %NULL.
  *
  * Creates a new image procedure named @name which will call @run_func
  * when invoked.
  *
  * See [ctor Procedure new] for information about @proc_type.
  *
- * Returns: a new #GimpProcedure.
+ * Returns: (transfer full): a new #GimpProcedure.
  *
  * Since: 3.0
  **/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]