1. 04 Nov, 2013 1 commit
  2. 14 Oct, 2013 3 commits
    • Simon Feltman's avatar
      Fix GArray, GList, GSList, and GHashTable marshaling leaks · fe217e0a
      Simon Feltman authored
      Remove calling of cleanup code for transfer-everything modes by ensuring
      cleanup_data is set to NULL in from_py marshalers. Use array and hash
      table ref/unref functions for container transfer mode to ensure we have a
      valid container ref after invoke and during from_py cleanup of contents.
      Rework restrictions with to_py marshaling cleanup so we always unref the
      container for transfer-everything and transfer-container modes.
    • 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).
    • Simon Feltman's avatar
      Add support for variable user data arguments · 9456e832
      Simon Feltman authored
      Support a variable number of user data arguments for all callback
      connection function where the user data is the last explicit argument.
      This adds convience as well as consistency with the rest of PyGObject.
      Cleanup overrides for GLib.idle_add, timeout_add, timeout_add_seconds,
      io_add_watch, and child_watch_add which manually implemented this
  3. 09 Oct, 2013 1 commit
  4. 08 Oct, 2013 2 commits
  5. 07 Oct, 2013 1 commit
  6. 26 Sep, 2013 4 commits
  7. 16 Sep, 2013 1 commit
  8. 02 Sep, 2013 1 commit
  9. 29 Jul, 2013 1 commit
  10. 27 Jul, 2013 2 commits
  11. 26 Jul, 2013 6 commits
  12. 25 Jul, 2013 1 commit
  13. 24 Jul, 2013 1 commit
  14. 10 Jul, 2013 1 commit
  15. 03 Jul, 2013 1 commit
  16. 05 Apr, 2013 3 commits
  17. 04 Apr, 2013 1 commit
  18. 08 Mar, 2013 1 commit
  19. 04 Mar, 2013 1 commit
    • Martin Pitt's avatar
      Fix leaking inout C arrays · d32b410a
      Martin Pitt authored
      g_*_info_invoke() changes the original state->in_args and state->args C arrays
      to the output values for (inout) arguments, thus losing the pointer to the
      originally allocated array. Remember that in state->args_data, so that we can
      free it in _pygi_marshal_cleanup_from_py_array().
      Reproduced by test_gi.TestArray.test_array_fixed_inout test case.
  20. 27 Feb, 2013 1 commit
    • Martin Pitt's avatar
      Fix cleanup of GValue arrays · 4f5e8b75
      Martin Pitt authored
      Commit bc1fd8 introduced a thinko: We must not change
      item_arg_cache->from_py_cleanup, as it's a global cache. Revert the original
      change, and instead put the hack into _pygi_marshal_cleanup_from_py_array(),
      which now short-circuits _pygi_marshal_cleanup_from_py_interface_struct_gvalue() to avoid
      trying to release a slice which has never been allocated in
  21. 26 Feb, 2013 1 commit
    • Chun-wei Fan's avatar
      gi/pygi-marshal-from-py.c: Fix build on Visual C++ · b3a3da37
      Chun-wei Fan authored
      Since Visual C++ does not provide the INFINITY and NAN constants in its
      math.h (they are items defined by C99), provide fallback implementations
      for it here.  The INFINITY constant can be provided with HUGE_VAL, since
      we are using INFINITY to check the value of a variable of double type, and
      we could use a rather simple workaround for NAN.
      Also avoid declaring variables in the middle of the block.
  22. 16 Feb, 2013 3 commits
  23. 11 Feb, 2013 1 commit
  24. 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.