1. 03 Feb, 2014 3 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.
    • 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
  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.
  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
      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!
  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
      Add hacks and comments to work around GTK+ bugs 693393 and 693400.
  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 *.
  24. 03 Jan, 2012 1 commit
  25. 02 Nov, 2011 3 commits
  26. 01 Nov, 2011 1 commit
  27. 25 Oct, 2011 1 commit
  28. 16 Sep, 2011 1 commit
    • John (J5) Palmieri's avatar
      fix most warnings · 225f2111
      John (J5) Palmieri authored
      * remove some unused vars
      * correctly cast vars
      * handle deprecated enums in switch statments by using default:
      * unused wanrings still remain in some places
  29. 12 Sep, 2011 1 commit
    • John (J5) Palmieri's avatar
      refactor in/out marshalling to be to_py/from_py · a4e4318b
      John (J5) Palmieri authored
      * in/out make sense from a C perspective but when you get to the
         python layers it makes more sense to label them as to_py and
         from_py to denote which way we are marshalling
       * this helps clear up the difference between callbacks which
         call into python and invoked functions which call into C
       * in the callback case we marshal in values to Python objects
         and out values to C types but in the invoke case we do the
         reverse.  Dealing with to_py/from_py makes the code much more
         resuable and consistant
  30. 25 Aug, 2011 2 commits