[ccan] deque: New module
Dan Good
dan at dancancode.com
Tue Dec 29 17:00:50 AEDT 2015
Thank you for the feedback. I have a practical question - what is the
workflow for making changes to this module, now that it's been merged? Do
I clone, then branch, edit, commit, push, merge, and finally mail a patch
to the list? I'm still learning git. I've been on the rcs/cvs/svn
bandwagon for a long time.
I'd like some clarification on the need for portability. Once I read your
comments, I came up with an ad-hoc list of platforms I felt I could
reasonably support: major Linux distros, FreeBSD, OS X, and OmniOS. I
tried the module on each successfully, though ccanlint needed changes to
build on everything but Linux, and the failtest based test went rogue on
two of the platforms.
Compound literals are a feature of C99 (nice article:
http://www.drdobbs.com/the-new-c-compound-literals/184401404).
Intermingled declarations and code are also from C99. Half of the
platforms above use gcc and half use clang. Both gcc and clang support
statement expressions. The _XOPEN_SOURCE define in _info is there for
getline(3) on Linux which is used solely in the demo code in _info.
Is there a set of platforms CCAN targets for support? Is there some way I
should document that the code is C99? Would the lines below be the right
way to handle the statement expression dependance?
#if !HAVE_STATEMENT_EXPR
#error Sorry, deque requires statement expressions
#endif
Thanks. -Dan
On Sun, Dec 27, 2015 at 10:45 PM David Gibson <david at gibson.dropbear.id.au>
wrote:
> On Wed, Dec 23, 2015 at 12:11:44PM +0000, Dan Good wrote:
> > deque - type-preserving resizing circular deque
>
> Concept looks good. There are some fairly minor nits in the
> implementation that I've noted below. However, none are serious
> enough to hold up merging, so I've applied this. I did modify
> trivially to remove some trailing whitespace.
>
> It would be nice to address some of the comments in follow up
> commits, particularly some of the portability issues.
>
[...]
> --
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/ccan/attachments/20151229/eb8427c8/attachment.html>
More information about the ccan
mailing list