Summary: | Add foreach support for libzeitgeist2's SimpleResultSet | ||
---|---|---|---|
Product: | Zeitgeist | Reporter: | Seif Lotfy <seif> |
Component: | python-zeitgeist | Assignee: | Seif Lotfy <seif> |
Status: | RESOLVED FIXED | QA Contact: | zeitgeist-bugs <zeitgeist-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Add foreach support to ResultSet
Add foreach support to ResultSet Add foreach support to ResultSet Add foreach support to ResultSet 2 |
Description
Seif Lotfy
2012-08-17 23:04:27 UTC
If we'd just inherit SimpleResultSet from the underlying GLib.GenericArray instead of just Object, we'd get this and a lot more for free. SimpleResultSet is just an internal implementation of ResultSet, ResultSet needs to have the iterator interface, not SimpleResultSet. Created attachment 65736 [details] [review] Add foreach support to ResultSet Created attachment 65738 [details] [review] Add foreach support to ResultSet Created attachment 65740 [details] [review] Add foreach support to ResultSet Comment on attachment 65740 [details] [review] Add foreach support to ResultSet Review of attachment 65740 [details] [review]: ----------------------------------------------------------------- Looking great, just one thing: ::: test/direct/datamodel-test.vala @@ +25,5 @@ > { > Test.init (ref argv); > > Test.add_func ("/Datamodel/MatchesTemplate/anything", matches_template_anything_test); > + Test.add_func ("/Datamodel/MatchesTemplate/foreach", foreach_test); Please add one more test that runs foreach twice on the ResultSet instance. Created attachment 65742 [details] [review] Add foreach support to ResultSet 2 An alternative implementation Going with the second solution congrats to all |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.