1. 05 Apr, 2013 3 commits
  2. 04 Apr, 2013 1 commit
  3. 08 Mar, 2013 1 commit
  4. 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.
  5. 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
  6. 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.
  7. 16 Feb, 2013 3 commits
  8. 11 Feb, 2013 1 commit
  9. 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.
  10. 31 Jan, 2013 1 commit
  11. 23 Jan, 2013 1 commit
  12. 15 Jan, 2013 1 commit
  13. 11 Jan, 2013 1 commit
  14. 18 Dec, 2012 1 commit
  15. 14 Nov, 2012 1 commit
    • Martin Pitt's avatar
      Drop dead code from pygi-callbacks.[hc] · cec5d1a5
      Martin Pitt authored
      _pygi_create_callback() and _pygi_scan_for_callbacks() are not used anywhere.
      _pygi_destroy_notify_create() fits better in pygi-marshal-from-py.c, so move it
      there, and drop pygi-callbacks.[hc] completely.
  16. 09 Nov, 2012 2 commits
    • Martin Pitt's avatar
      Fix marshalling of GByteArrays · b800a690
      Martin Pitt authored
      In _pygi_marshal_from_py_array(), set the array length after copying the data
      in the GI_TYPE_TAG_UINT8 case (which applies for GByteArrays), otherwise it
      will always come out as zero length.
      Enable the TestGByteArray.test_bytearray_none_in() test case as that works now.
    • Martin Pitt's avatar
      Fix marshalling of ssize_t to smaller ints · fa568949
      Martin Pitt authored
      Add missing marshalling cases for (u)int8 and (u)int16. This fixes the
      TestArray.test_array_in test, so drop the expected failure.
  17. 12 Oct, 2012 2 commits
  18. 04 Oct, 2012 1 commit
  19. 28 Sep, 2012 1 commit
  20. 20 Aug, 2012 1 commit
  21. 03 Aug, 2012 1 commit
  22. 31 Jul, 2012 4 commits
  23. 30 Jul, 2012 1 commit
    • Martin Pitt's avatar
      Fix error messages on interface/class type mismatches · 121b1402
      Martin Pitt authored
      Previously, when you called a function with an argument which was not
      compatible with the expected class/interface type, you got an error message
        TypeError: Expected Gtk.TreeViewColumn, but got GObjectMeta
      which had the wrong (and useless) class name for the actual type, and did not
      tell you which argument caused the problem. With this it says e. g.
        TypeError: argument column: Expected Gtk.TreeViewColumn, but got Gtk.Button
  24. 11 Jul, 2012 1 commit
  25. 24 Apr, 2012 1 commit
  26. 21 Mar, 2012 1 commit
  27. 16 Mar, 2012 2 commits
    • Martin Pitt's avatar
      Fix double-freeing GValues in arrays · bc1fd881
      Martin Pitt authored
      When marshalling a GValue array to C, the GValue items are copied into a C
      GValue array, not a C GValue pointer array. _pygi_marshal_from_py_array()
      already calls the cleanup_func for the original item;
      _pygi_marshal_cleanup_from_py_array() must not do it again, as this would try
      to g_slice_free the array item.
    • Martin Pitt's avatar
      Fix Python to C marshalling of GValue arrays · d7d28d71
      Martin Pitt authored
      For GValues we cannot just copy the GValue memory in
      _pygi_marshal_from_py_array(), as the from_py_cleanup() function clears and
      releases the GValue and with it its v_pointer. Use g_value_copy() to copy by
      value instead.
      This uncovered another bug in _pygi_marshal_cleanup_from_py_array(): It always
      assumed that C arrays contained pointers, but this is not the case for GValue
      arrays: these are actual struct arrays, not struct pointer arrays (cf. their
      construction in _pygi_marshal_from_py_array()). Check if an array contains
      pointers or values and compute the correct array item pointer for both cases.
      Also add a corresponding test case for marshalling GValue arrays from C back to
      Python, which works fine.
  28. 09 Mar, 2012 1 commit
  29. 04 Mar, 2012 1 commit
  30. 04 Jan, 2012 1 commit