Skip to content

Commit f70c622

Browse files
authored
Merge pull request #412 from mvz/handle-vfunc-return-flags
Support vfuncs returning a value of type flags
2 parents 4df63d1 + 024beff commit f70c622

3 files changed

Lines changed: 2 additions & 3 deletions

File tree

‎lib/gir_ffi/builders/ruby_to_c_convertor.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def conversion_method
3333
else
3434
"from"
3535
end
36-
when :enum
36+
when :enum, :flags
3737
"to_int"
3838
else
3939
"from"

‎lib/gir_ffi/info_ext/i_type_info.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def needs_c_to_ruby_conversion_for_functions?
156156
end
157157

158158
def needs_ruby_to_c_conversion_for_callbacks?
159-
[:enum].include?(flattened_tag) ||
159+
[:enum, :flags].include?(flattened_tag) ||
160160
needs_ruby_to_c_conversion_for_functions?
161161
end
162162

‎test/integration/generated_gimarshallingtests_test.rb‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,6 @@ def make_derived_instance
815815

816816
it "has a working method #vfunc_return_flags" do
817817
skip_below "1.66.1"
818-
skip "Not implemented yet"
819818
derived_instance = make_derived_instance do |klass|
820819
klass.install_vfunc_implementation :vfunc_return_flags,
821820
proc { |_obj| { value2: true } }

0 commit comments

Comments
 (0)