diff options
-rw-r--r-- | tools/pm/Common/Output/BoxedType.pm | 16 | ||||
-rw-r--r-- | tools/pm/Common/Output/Enum.pm | 2 | ||||
-rw-r--r-- | tools/pm/Common/Output/GError.pm | 4 | ||||
-rw-r--r-- | tools/pm/Common/Output/Method.pm | 3 | ||||
-rw-r--r-- | tools/pm/Common/Output/Shared.pm | 10 | ||||
-rw-r--r-- | tools/pm/Common/SectionManager.pm | 6 | ||||
-rw-r--r-- | tools/pm/Common/TypeDetails/Value.pm | 4 | ||||
-rw-r--r-- | tools/pm/Common/WrapParser.pm | 33 |
8 files changed, 40 insertions, 38 deletions
diff --git a/tools/pm/Common/Output/BoxedType.pm b/tools/pm/Common/Output/BoxedType.pm index ebadbdb8..25504a66 100644 --- a/tools/pm/Common/Output/BoxedType.pm +++ b/tools/pm/Common/Output/BoxedType.pm @@ -28,7 +28,7 @@ sub nl return Common::Output::Shared::nl @_; } -sub _output_h_before_first_namespace ($$$) +sub _output_h_before_first_namespace { my ($wrap_parser, $c_type, $cxx_type) = @_; my $section_manager = $wrap_parser->get_section_manager; @@ -44,7 +44,7 @@ sub _output_h_before_first_namespace ($$$) $section_manager->set_variable_for_conditional ($variable, $conditional); } -sub _output_h_in_class ($$$) +sub _output_h_in_class { my ($wrap_parser, $c_type, $cxx_type) = @_; my $section_manager = $wrap_parser->get_section_manager; @@ -87,7 +87,7 @@ sub _output_h_in_class ($$$) $section_manager->pop_entry; } -sub _output_h_after_first_namespace ($$$) +sub _output_h_after_first_namespace { my ($wrap_parser, $c_type, $cxx_type) = @_; my $section_manager = $wrap_parser->get_section_manager; @@ -223,14 +223,14 @@ sub _output_cc $section_manager->pop_entry; } -sub output ($) +sub output { my ($wrap_parser, $c_type, $cxx_type, $get_type_func, $new_func, $copy_func, $free_func) = @_; - _output_h_before_first_namespace $wrap_parser, $c_type, $cxx_type; - _output_h_in_class $wrap_parser, $c_type, $cxx_type; - _output_h_after_first_namespace $wrap_parser, $c_type, $cxx_type; - _output_cc $wrap_parser, $c_type, $cxx_type, $get_type_func, $new_func, $copy_func, $free_func; + _output_h_before_first_namespace ($wrap_parser, $c_type, $cxx_type); + _output_h_in_class ($wrap_parser, $c_type, $cxx_type); + _output_h_after_first_namespace ($wrap_parser, $c_type, $cxx_type); + _output_cc ($wrap_parser, $c_type, $cxx_type, $get_type_func, $new_func, $copy_func, $free_func); } 1; # indicate proper module load. diff --git a/tools/pm/Common/Output/Enum.pm b/tools/pm/Common/Output/Enum.pm index 835833db..def3d24d 100644 --- a/tools/pm/Common/Output/Enum.pm +++ b/tools/pm/Common/Output/Enum.pm @@ -82,7 +82,7 @@ sub _output_flag_ops if ($container_cxx_type) { - my $section = Common::Output::Shared::get_section $wrap_parser, Common::Sections::H_AFTER_FIRST_CLASS; + my $section = Common::Output::Shared::get_section ($wrap_parser, Common::Sections::H_AFTER_FIRST_CLASS); $section_manager->append_string_to_section ($code_string, $section); } diff --git a/tools/pm/Common/Output/GError.pm b/tools/pm/Common/Output/GError.pm index 190fc554..0b8b6c6b 100644 --- a/tools/pm/Common/Output/GError.pm +++ b/tools/pm/Common/Output/GError.pm @@ -116,8 +116,8 @@ sub _output_gerror_impl nl (' throw ' . $full_cxx_type . '(gobject);') . nl ('}') . nl () . - Common::Output::Shared::close_namespaces $wrap_parser; - my $section = Common::Output::Shared::get_section $wrap_parser, Common::Sections::CC_GENERATED; + Common::Output::Shared::close_namespaces ($wrap_parser); + my $section = Common::Output::Shared::get_section ($wrap_parser, Common::Sections::CC_GENERATED); $section_manager->append_string_to_section ($code_string, $section); } diff --git a/tools/pm/Common/Output/Method.pm b/tools/pm/Common/Output/Method.pm index 09ed11d8..804e9df5 100644 --- a/tools/pm/Common/Output/Method.pm +++ b/tools/pm/Common/Output/Method.pm @@ -155,7 +155,8 @@ sub _output_cc ($$$$$$$$$$$$$$$$$) splice (@{$prepped_cxx_param_types}, $cxx_param_out_index, 1); splice (@{$prepped_cxx_param_names}, $cxx_param_out_index, 1); } - my $convs_str = Common::Output::Shared::convzipstr $wrap_parser, $prepped_cxx_param_types, $c_param_types, $c_param_transfers, $prepped_cxx_param_names; + + my $convs_str = Common::Output::Shared::convzipstr ($wrap_parser, $prepped_cxx_param_types, $c_param_types, $c_param_transfers, $prepped_cxx_param_names); $prepped_cxx_param_types = undef; $prepped_cxx_param_names = undef; diff --git a/tools/pm/Common/Output/Shared.pm b/tools/pm/Common/Output/Shared.pm index 007c06ca..b61ae856 100644 --- a/tools/pm/Common/Output/Shared.pm +++ b/tools/pm/Common/Output/Shared.pm @@ -139,8 +139,8 @@ sub get_cxx_type ($) sub get_full_cxx_type ($) { my ($wrap_parser) = @_; - my $classes = $wrap_parser->get_classes; - my $full_cxx_class = join '::', @{$classes}; + my $classes = $wrap_parser->get_classes (); + my $full_cxx_class = join ('::', @{$classes}); return $full_cxx_class; } @@ -149,8 +149,8 @@ sub get_full_cxx_type ($) sub get_full_namespace ($) { my ($wrap_parser) = @_; - my $namespaces = $wrap_parser->get_namespaces; - my $full_namespace = join '::', @{$namespaces}; + my $namespaces = $wrap_parser->get_namespaces (); + my $full_namespace = join ('::', @{$namespaces}); return $full_namespace; } @@ -179,7 +179,7 @@ sub get_complete_cxx_type ($) sub get_cxx_class_type ($) { my ($wrap_parser) = @_; - my $full_cxx_type = get_full_cxx_type $wrap_parser; + my $full_cxx_type = get_full_cxx_type ($wrap_parser); $full_cxx_type =~ s/::/_/g; return $full_cxx_type . '_Class'; diff --git a/tools/pm/Common/SectionManager.pm b/tools/pm/Common/SectionManager.pm index d1608205..88d33b58 100644 --- a/tools/pm/Common/SectionManager.pm +++ b/tools/pm/Common/SectionManager.pm @@ -38,7 +38,7 @@ use constant # TODO: get wrapparser? -sub _get_header () +sub _get_header { my @code = ( @@ -50,7 +50,7 @@ sub _get_header () return join "\n", @code; } -sub _get_header_guard ($$) +sub _get_header_guard { my ($self, $suffix) = @_; my $base = $self->_get_base; @@ -62,7 +62,7 @@ sub _get_header_guard ($$) return join '_', '', (uc $mm_module), (uc $base), $suffix, ''; } -sub _prepare_h_section ($) +sub _prepare_h_section { my ($self) = @_; my $header_guard = $self->_get_header_guard ('H'); diff --git a/tools/pm/Common/TypeDetails/Value.pm b/tools/pm/Common/TypeDetails/Value.pm index d53d1ea5..f0066130 100644 --- a/tools/pm/Common/TypeDetails/Value.pm +++ b/tools/pm/Common/TypeDetails/Value.pm @@ -225,8 +225,8 @@ sub equal ($$$) if (($flags & Common::TypeDetails::Base::RECURSIVE) == Common::TypeDetails::Base::RECURSIVE) { - my $self_template = $self->_get_template; - my $other_template = $other->_get_template; + my $self_template = $self->get_templates (); + my $other_template = $other->get_templates (); my $self_template_count = @{$self_template}; my $other_template_count = @{$other_template}; diff --git a/tools/pm/Common/WrapParser.pm b/tools/pm/Common/WrapParser.pm index 60d98376..f323065f 100644 --- a/tools/pm/Common/WrapParser.pm +++ b/tools/pm/Common/WrapParser.pm @@ -922,8 +922,8 @@ sub _on_wrap_method ($) } } - my $ret_transfer = $c_function->get_return_transfer; - my $throws = $c_function->get_throws; + my $ret_transfer = $c_function->get_return_transfer (); + my $throws = $c_function->get_throws (); # TODO: remove the ifs below after possible bugs in # TODO continued: wrappers/annotations are fixed. @@ -945,7 +945,7 @@ sub _on_wrap_method ($) $ifdef, $c_function->get_return_type, $ret_transfer, - $c_function->get_name, + $c_function->get_name (), $c_param_types, $c_param_transfers, $throws); @@ -1834,7 +1834,7 @@ sub _on_class_gtk_object ($) sub _on_class_boxed_type ($) { my ($self) = @_; - my @args = Common::Shared::string_split_commas $self->_extract_bracketed_text; + my @args = Common::Shared::string_split_commas ($self->_extract_bracketed_text ()); if (@args > 5) { @@ -1996,13 +1996,13 @@ sub _on_class_boxed_type ($) $self->_push_gir_record ($gir_record); $self->_push_c_class ($c_type); - Common::Output::BoxedType::output $self, - $c_type, - $cxx_type, - $get_type_func, - $new_func, - $copy_func, - $free_func; + Common::Output::BoxedType::output ($self, + $c_type, + $cxx_type, + $get_type_func, + $new_func, + $copy_func, + $free_func); } sub _on_class_boxed_type_static ($) @@ -2690,9 +2690,9 @@ sub _on_class_keyword ($) } elsif ($token eq '{') { - my $level = $self->get_level; - my $classes = $self->get_classes; - my $class_levels = $self->get_class_levels; + my $level = $self->get_level (); + my $classes = $self->get_classes (); + my $class_levels = $self->get_class_levels (); # TODO: rather use type fixup $name =~ s/\s+//g; @@ -2701,9 +2701,10 @@ sub _on_class_keyword ($) if (@{$classes} == 1) { - $self->generate_first_class_number; + $self->generate_first_class_number (); - my $section = Common::Output::Shared::get_section $self, Common::Sections::H_BEFORE_FIRST_CLASS; + my $section = Common::Output::Shared::get_section ($self, + Common::Sections::H_BEFORE_FIRST_CLASS); $section_manager->append_section_to_section ($section, $main_section); } |