File gjs-gi-Allow-optional-inout-arguments-to-be-null.patch of Package gjs

diff --git a/gi/arg-cache.cpp b/gi/arg-cache.cpp
index d11e8ed..1bc325c 100644
--- a/gi/arg-cache.cpp
+++ b/gi/arg-cache.cpp
@@ -3642,6 +3642,9 @@ void ArgsCache::build_arg(uint8_t gi_index, GIDirection direction,
     GjsArgumentFlags flags = GjsArgumentFlags::NONE;
     if (arg.may_be_null())
         flags |= GjsArgumentFlags::MAY_BE_NULL;
+    if ((direction == GI_DIRECTION_OUT || direction == GI_DIRECTION_INOUT) &&
+        arg.is_optional())
+        flags |= GjsArgumentFlags::MAY_BE_NULL;
     if (arg.caller_allocates())
         flags |= GjsArgumentFlags::CALLER_ALLOCATES;
 
openSUSE Build Service is sponsored by