From: Ken Brown <kbrown@cornell.edu>
To: cygwin-apps@cygwin.com
Subject: [PATCH setup 1/3] Make sure that the IniDBBuilderPackage destructor is called when needed
Date: Sat, 17 Mar 2018 15:00:00 -0000 [thread overview]
Message-ID: <20180317145955.4944-2-kbrown@cornell.edu> (raw)
In-Reply-To: <20180317145955.4944-1-kbrown@cornell.edu>
The IniDBBuilderPackage destructor contains code that is intended to
be run after each setup.ini file is processed. But the
IniDBBuilderPackage variables in do_local_ini() and do_remote_ini were
declared outside the loop that processed the files. Move the
declaration inside the loop so that the destructor is called after
each iteration.
---
ini.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/ini.cc b/ini.cc
index d807ed6..7afeba2 100644
--- a/ini.cc
+++ b/ini.cc
@@ -209,13 +209,13 @@ static bool
do_local_ini (HWND owner)
{
bool ini_error = false;
- GuiParseFeedback myFeedback;
- IniDBBuilderPackage aBuilder (myFeedback);
io_stream *ini_file, *ini_sig_file;
// iterate over all setup files found in do_from_local_dir
for (IniList::const_iterator n = found_ini_list.begin ();
n != found_ini_list.end (); ++n)
{
+ GuiParseFeedback myFeedback;
+ IniDBBuilderPackage aBuilder (myFeedback);
bool sig_fail = false;
std::string current_ini_ext, current_ini_name, current_ini_sig_name;
@@ -268,8 +268,6 @@ static bool
do_remote_ini (HWND owner)
{
bool ini_error = false;
- GuiParseFeedback myFeedback;
- IniDBBuilderPackage aBuilder (myFeedback);
io_stream *ini_file = NULL, *ini_sig_file;
/* FIXME: Get rid of this io_stream pointer travesty. The need to
@@ -279,6 +277,8 @@ do_remote_ini (HWND owner)
for (SiteList::const_iterator n = site_list.begin ();
n != site_list.end (); ++n)
{
+ GuiParseFeedback myFeedback;
+ IniDBBuilderPackage aBuilder (myFeedback);
bool sig_fail = false;
std::string current_ini_ext, current_ini_name, current_ini_sig_name;
// iterate over known extensions for setup
--
2.16.2
next prev parent reply other threads:[~2018-03-17 15:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-17 15:00 [PATCH setup 0/3] Improve the handling of packagesource::sites Ken Brown
2018-03-17 15:00 ` Ken Brown [this message]
2018-06-10 20:58 ` [PATCH setup 1/3] Make sure that the IniDBBuilderPackage destructor is called when needed Jon Turney
2018-03-17 15:00 ` [PATCH setup 3/3] Keep track of all known sites for a given version of a package Ken Brown
2018-07-09 18:17 ` Jon Turney
2018-07-09 18:19 ` [PATCH setup 1/2] Add Vendor() accessor method to SolvableVersion Jon Turney
2018-07-09 18:19 ` [PATCH setup 2/2] Keep track of all known sites for a given version of a package Jon Turney
2018-07-10 16:12 ` [PATCH setup 3/3] " Ken Brown
2018-03-17 15:00 ` [PATCH setup 2/3] Internalize the libsolv repo attribute data after each setup.ini Ken Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180317145955.4944-2-kbrown@cornell.edu \
--to=kbrown@cornell.edu \
--cc=cygwin-apps@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).