From: David Gibson <david@gibson.dropbear.id.au>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: ccan@lists.ozlabs.org
Subject: Re: dgraph, tlist, tcon: MSVC error due to array of flexible structs
Date: Wed, 28 Sep 2016 13:12:40 +1000 [thread overview]
Message-ID: <20160928031240.GG18880@umbus> (raw)
In-Reply-To: <87fuokn598.fsf@rustcorp.com.au>
[-- Attachment #1.1: Type: text/plain, Size: 1437 bytes --]
On Wed, Sep 28, 2016 at 11:40:43AM +0930, Paul 'Rusty' Russell wrote:
> David Gibson <david@gibson.dropbear.id.au> writes:
> > IIRC, Rusty didn't want to simply replace the tlist module in case
> > there could be subtle brekages in usage.
>
> BTW, I think this gives us good reason to simply mv tlist2 -> tlist and
> fix up the callers.
Hm.. perhaps. As noted in another mail, converting dgraph at least to
tlist2 might be a bit ugly. The two lists it keeps would now have
different types, so it couldn't just keep them as an array, which
might make things less natural in other places.
Maybe any extra switch/ifs will be cancelled out by removing (or
folding into) existing ones.
It would also be possible to make a more minimal conversion of tlist
to TCON_WRAP() which keeps the tlist interface unchanged.
I am thinking we should probably phase out TCON in favour of TCON_WRAP
everywhere - that flexible array member is causing repeated trouble.
Another thing we might want as an interim approach is to add a new
config test for zero-length array members (as opposed to flexible
array members). TCON could then use those when available and fall
back to the space wasting 1-member array method otherwise.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 127 bytes --]
_______________________________________________
ccan mailing list
ccan@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/ccan
next prev parent reply other threads:[~2016-09-28 3:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-23 4:31 dgraph, tlist, tcon: MSVC error due to array of flexible structs Kevin Locke
2016-09-27 4:45 ` David Gibson
2016-09-28 2:10 ` Rusty Russell
2016-09-28 3:12 ` David Gibson [this message]
2017-08-01 5:22 ` David Gibson
2017-08-02 5:38 ` Kevin Locke
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=20160928031240.GG18880@umbus \
--to=david@gibson.dropbear.id.au \
--cc=ccan@lists.ozlabs.org \
--cc=rusty@rustcorp.com.au \
/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