From: Chris Brannon <chris@the-brannons.com>
To: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] [PATCH] Use the list class from the C++ STL,...
Date: Thu, 30 Jan 2014 13:23:02 -0800 [thread overview]
Message-ID: <87a9edkvux.fsf@mushroom.PK5001Z> (raw)
In-Reply-To: <20140030124905.eklhad@comcast.net> (Karl Dahlke's message of "Thu, 30 Jan 2014 12:49:05 -0500")
Karl Dahlke <eklhad@comcast.net> writes:
> but why aren't you using
>
> static list < struct htmlTag >htmlStack;
That's not a bad idea. There are a few things preventing it.
htmlTag should probably be a proper class, with a constructor,
destructor, copy constructor, and assignment operator.
Also, to make life easier, all the char * members need to be replaced
with string. I'm working on that, but it'll take a while.
Next, we have an issue of duplication. We have two data structures that
will hold the same set of tags, one being cw->tags (an array), and the
other being htmlStack. If we use structs instead of pointers in these,
the data structures can get out of sync when code modifies a tag in just
one of them. If cw->tags is never constructed while htmlStack is in
use, then this isn't actually a problem. But I'm not sure if that is
the case.
-- Chris
next prev parent reply other threads:[~2014-01-30 21:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-30 17:49 Karl Dahlke
2014-01-30 21:23 ` Chris Brannon [this message]
2014-01-30 21:58 Karl Dahlke
2014-01-30 22:18 ` Chris Brannon
2014-01-31 12:09 ` Adam Thompson
2014-01-31 12:35 ` Chris Brannon
2014-01-30 22:25 Karl Dahlke
2014-01-31 13:02 Karl Dahlke
2014-01-31 17:33 ` Adam Thompson
2014-01-31 18:37 Karl Dahlke
2014-01-31 18:48 ` Chris Brannon
2014-02-02 13:43 ` Adam Thompson
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=87a9edkvux.fsf@mushroom.PK5001Z \
--to=chris@the-brannons.com \
--cc=Edbrowse-dev@lists.the-brannons.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 NNTP newsgroup(s).