1. 03 Feb, 2014 9 commits
  2. 14 Jan, 2014 1 commit
  3. 08 Oct, 2013 2 commits
    • Simon Feltman's avatar
      Fix to Python marshaling leaks for arrays holding GVariants · 31263ac1
      Simon Feltman authored
      Add early check for array items holding pointers and simply assign the
      pointer to GIArgument.v_pointer prior giving it to the per-item marshaler.
      This simplifies marshaling and fixes leaks regarding arrays of GVariants by
      removing the unneeded g_variant_ref_sink (variants are always pointers).
      Conditionalize the use of g_variant_ref_sink based on transfer mode in the
      per-item marshaler. This fixes a reference leak where we are given ownership
      of the variant (transfer full) but added a new ref anyway.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=693402
      31263ac1
    • Simon Feltman's avatar
      Fix GValue array marshaling leaks and crash fallout · 4623caa7
      Simon Feltman authored
      * Decrement references for results of PySequence_GetItem. There were a few
      places we were not decrementing the Python reference, leaking the value.
      * Add tracking of Python arguments with recursive marshaling cleanup. This
      allows arrays of GValues which have been coerced from Python types to be
      properly free'd (also fixes bug 703662).
      * Use g_variant_ref for variant arguments marked as transfer everything.
      This fixes double free's caused by the decrementing of PySequence_GetItem
      results.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=693402
      4623caa7
  4. 26 Sep, 2013 2 commits
  5. 27 Jul, 2013 1 commit
    • Simon Feltman's avatar
      Add underscore prefix and _cache_adapter suffix to marshaling functions · 627c5faa
      Simon Feltman authored
      Add underscores to all _pygi_marshal_* functions. We don't currently
      export symbols, but we might need to for C unittesting. This will
      ensure we don't have a "public API".
      Add _cache_adapter suffix to marshaling functions which are light
      weight wrappers intended only for cached marshalers.
      627c5faa
  6. 26 Jul, 2013 1 commit
  7. 25 Jul, 2013 1 commit
  8. 24 Jul, 2013 1 commit
  9. 10 Jul, 2013 1 commit
  10. 05 Apr, 2013 3 commits
  11. 01 Mar, 2013 1 commit
  12. 28 Feb, 2013 1 commit
    • Martin Pitt's avatar
      Fix leak of caller-allocated boxed values · 105e6738
      Martin Pitt authored
      Add a new "allocated_slice" argument to _pygi_boxed_new() which specifies
      whether its "boxed" pointer was allocated using a slice (by giving its size) or
      malloc (by specifying 0), as _pygi_boxed_new cannot determine that itself any
      more.
      
      Use this in _pygi_marshal_to_py_interface_struct() for caller-allocated boxed
      values, as _caller_alloc() uses _pygi_boxed_alloc() for those (i. e. slices),
      which would otherwise leak.
      
      Thanks to Mike Gorse <mgorse@suse.com> for the original patch!
      
      https://bugzilla.gnome.org/show_bug.cgi?id=691501
      105e6738
  13. 27 Feb, 2013 1 commit
  14. 08 Feb, 2013 1 commit
    • Simon Feltman's avatar
      Fix reference leaks with transient floating objects · 5efe2e5c
      Simon Feltman authored
      Unify and refactor caller and callee GObject argument marshalers.
      Combine code from the large switch statement used to marshal
      arguments to and from vfuncs/closures with the marshalers used
      for direct calls to gi functions. This fixes a reference leak
      when marshalling GObjects to Python with transfer=full due to
      the diverging code paths.
      Replace ability in gobject_new_full to optionally sink objects
      with ability to optionaly "steal" objects. This fits the premise
      that binding layers should always sink objects initially. The
      steal argument is then used for marshalling arguments which are
      transfer=full.
      Add hacks and comments to work around GTK+ bugs 693393 and 693400.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=687522
      5efe2e5c
  15. 15 Jan, 2013 1 commit
  16. 14 Jan, 2013 1 commit
  17. 10 Jan, 2013 1 commit
  18. 14 Nov, 2012 1 commit
  19. 20 Aug, 2012 2 commits
  20. 03 Aug, 2012 1 commit
  21. 21 Mar, 2012 1 commit
  22. 09 Mar, 2012 1 commit
  23. 24 Jan, 2012 1 commit
    • Will Thompson's avatar
      Support functions which return GError · adcfe96d
      Will Thompson authored
      GStreamer has the following method:
      
        void gst_message_parse_error (
            GstMessage *message,
            GError **error,
            gchar **debug_message);
      
      With this patch, we marshal the GError out parameter as a GObject.GError
      exception, but return it rather than throwing it. The test cases cover
      two variations on the theme of the function above (one with (transfer
      full), as in GStreamer, and another with (transfer none)) as well as a
      function with return type GError *.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=666098
      adcfe96d
  24. 03 Jan, 2012 1 commit
  25. 02 Nov, 2011 3 commits