[glibmm/gmmproc-refactor] Do not put FUNC and MANUAL types into conversions system.



commit 79f2f8a1416cce624f00cb0b037a2fbe6da00ced
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Thu Jul 12 18:10:35 2012 +0200

    Do not put FUNC and MANUAL types into conversions system.

 tools/pm/Common/Gmmproc.pm         |    1 +
 tools/pm/Common/TypeInfo/Global.pm |    3 ++-
 2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/tools/pm/Common/Gmmproc.pm b/tools/pm/Common/Gmmproc.pm
index 07f3cc7..df8f447 100644
--- a/tools/pm/Common/Gmmproc.pm
+++ b/tools/pm/Common/Gmmproc.pm
@@ -191,6 +191,7 @@ sub _scan_all_bases
     my $tuples = $tokens_store->get_tuples ();
     my $modules = $tokens_store->get_modules ();
 
+    # TODO: FUNC and MANUAL types should not be added.
     map { $type_info_global->add_generated_info (@{$_}); } @{$tuples};
     map { $gir_modules{$_} = undef; } @{$modules};
   }
diff --git a/tools/pm/Common/TypeInfo/Global.pm b/tools/pm/Common/TypeInfo/Global.pm
index 2eb0264..6ba81c5 100644
--- a/tools/pm/Common/TypeInfo/Global.pm
+++ b/tools/pm/Common/TypeInfo/Global.pm
@@ -725,7 +725,8 @@ sub register_convertor ($$$)
 sub add_generated_info ($$$$)
 {
   my ($self, $c_stuff, $cxx_stuff, $type) = @_;
-  my $apply_conversion = 1;
+# TODO: Probably get rid of MANUAL and FUNC convertors. They are pointless anyway.
+  my $apply_conversion = (($type eq 'MANUAL' or $type eq 'FUNC') ? 0 : 1);
   my $apply_mapping = 1;
 
   $self->_add_info_to_general_conversions ($c_stuff, $cxx_stuff, $type, GENERATED, $apply_conversion, $apply_mapping);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]