1. 03 Feb, 2014 3 commits
  2. 14 Jan, 2014 1 commit
  3. 14 Oct, 2013 1 commit
    • Simon Feltman's avatar
      Add cleanup_data argument used for Python to C marshaler cleanup · 7407367f
      Simon Feltman authored
      Add a new output argument to all from_py marshalers which is used for
      keeping track of marshaling data that later needs cleanup. Previously most
      marshalers would rely on the GIArgument->v_pointer as the means for data
      cleanup. However, this pointer would get clobbered in the case of
      bi-directional arguments (inout) and the memory lost.
      Use the new cleanup_data for storing temporarily wrapped C arrays so we
      don't need to re-calculate the length argument during cleanup.
      Additionally delay the from_py marshaling cleanup function until after
      _invoke_marshal_out_args is called. This gives inout arguments which don't
      modify the pointer sufficient time to exist until they marshaled back to
      Python (gi_marshalling_tests_gvalue_inout).
  4. 26 Sep, 2013 1 commit
  5. 27 Jul, 2013 2 commits
  6. 26 Jul, 2013 2 commits
  7. 25 Jul, 2013 4 commits
  8. 03 Jul, 2013 2 commits
  9. 22 Apr, 2013 1 commit
  10. 05 Apr, 2013 10 commits
  11. 04 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
    • Martin Pitt's avatar
      Fix marshalling of C arrays with explicit length in signal arguments · b6fefd62
      Martin Pitt authored
      We need _pygi_argument_to_array() from both closure marshalling (where we have
      the arguments as GIArgument array) and signal closure marshalling (where we
      have the arguments in a GValue array). Add an alternative "args_values"
      parameter to _pygi_argument_to_array() so that callers can specify one or the
      other depending on which type they have available.
      This allows us to pass on the full argument list for signal closures, so that
      _pygi_argument_to_array() can access the explicit length argument for an
      This fixes the GSettings:change-event signal.
  14. 16 Feb, 2013 3 commits
  15. 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.
  16. 01 Feb, 2013 1 commit
  17. 30 Jan, 2013 2 commits
  18. 11 Jan, 2013 1 commit
  19. 08 Jan, 2013 1 commit
    • Martin Pitt's avatar
      Use g-i stack allocation API · c02a00ae
      Martin Pitt authored
      Where possible, i. e. when not keeping references across functions, use the
      _load_() methods instead of the _get_() ones from gobject-introspection, which
      is faster and less prone to memory leaks:
        g_callable_info_get_arg () 鈫 g_callable_info_load_arg ()
        g_callable_info_get_return_type() 鈫 g_callable_info_load_return_type ()
        g_arg_info_get_type() 鈫 g_arg_info_load_type ()
  20. 29 Nov, 2012 1 commit
    • Martin Pitt's avatar
      Fix array arguments on 32 bit · 37ab2275
      Martin Pitt authored
      In _pygi_argument_from_object() we never put the actual element GType into the
      constructed array. The array contains GIArguments, or bytes in the case of
      passing a string as an array.
      This happened to work on 64 bit machines where GIArgument and char* have the
      same size, but not on 32 bit machines (test_gi.TestPropertiesObject.test_strv
      fails there).