[perl-Glib-Object-Introspection] Croak in setup for unhandled modificaion combinations



commit 61c406a02bb58e495bbd5b53f46d3bd4a449bd0d
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Sat Sep 12 12:50:13 2015 +0200

    Croak in setup for unhandled modificaion combinations
    
    Currently, if a function appears in flatten_array_ref_return and
    handle_sentinel_boolean, it's not handled correctly.  So throw an
    exception in this case for now.

 lib/Glib/Object/Introspection.pm |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/lib/Glib/Object/Introspection.pm b/lib/Glib/Object/Introspection.pm
index 0e9e6e8..94f4826 100644
--- a/lib/Glib/Object/Introspection.pm
+++ b/lib/Glib/Object/Introspection.pm
@@ -38,6 +38,14 @@ sub _create_invoker_sub {
   my ($basename, $namespace, $name,
       $shift_package_name, $flatten_array_ref_return,
       $handle_sentinel_boolean) = @_;
+  if ($flatten_array_ref_return && $handle_sentinel_boolean) {
+    croak sprintf
+      "Cannot handle the options flatten_array_ref and handle_sentinel_boolean " .
+      "at the same time for %s%s::%s",
+      $_BASENAME_TO_PACKAGE{$basename},
+      defined $namespace ? "::$namespace" : '',
+      $name;
+  }
   if ($flatten_array_ref_return) {
     return sub {
       shift if $shift_package_name;


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