Francois Gouget : testbot/orm: Let the Collection Items field pop into existence when needed.

Alexandre Julliard julliard at winehq.org
Thu May 19 16:11:13 CDT 2022


Module: tools
Branch: master
Commit: 9ee451bf6f647490636c526710e16621907f6c16
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=9ee451bf6f647490636c526710e16621907f6c16

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu May 19 19:14:52 2022 +0200

testbot/orm: Let the Collection Items field pop into existence when needed.

Collections don't check that it exists so all setting it in the
constructor does is waste memory. Documenting its existence there is
enough.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/lib/ObjectModel/Collection.pm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/testbot/lib/ObjectModel/Collection.pm b/testbot/lib/ObjectModel/Collection.pm
index 4e7a032..63d470b 100644
--- a/testbot/lib/ObjectModel/Collection.pm
+++ b/testbot/lib/ObjectModel/Collection.pm
@@ -93,7 +93,8 @@ sub new($$$$$;$$@)
               MasterKey           => ComputeMasterKey($MasterColValues),
               # Filter => undef by default
               AllScopeItems       => $AllScopeItems || {},
-              Items               => undef};
+              # Items => undef by default
+  };
   if ($AllScopeItems)
   {
     # Avoid memory cycles in case Items have Detailref properties:
@@ -138,7 +139,8 @@ sub Clone($)
               MasterKey           => $self->{MasterKey},
               # Filter => undef by default
               AllScopeItems       => $self->{AllScopeItems},
-              Items               => undef};
+              # Items => undef by default
+  };
   # See Collection::new()
   weaken($Copy->{AllScopeItems});
 




More information about the wine-cvs mailing list