grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Removing nested functions, part one of lots


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: [PATCH] Removing nested functions, part one of lots
Date: Thu, 03 Jan 2013 20:32:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121122 Icedove/10.0.11

On 01.01.2013 15:42, Colin Watson wrote:

> I have a number of patches mostly ready to go, but I'd prefer to make
> sure that this general approach is agreed before preparing and sending
> more than one of them.  I'd like to work one *_iterate function at a
> time (except where multiple iterators are entangled in a stack such that
> we need to change several at once, as is the case in parts of the
> disk/filesystem stacks), as that's roughly the minimum sensible unit and
> it makes it reasonably easy to grep for missing changes.

There is also another approach of using iterators of the kind:

struct pci_iterator;
void pci_init (struct pci_iterator *pci);
int pci_iter (struct pci_iterator *pci);
#define FOR_PCI_DEVICE(x) for (pci_init (&x); pci_iter (&x);)

I have done it for PCI but seem to have bzr problem:
bzr: ERROR: Revision address@hidden
not present in
"Graph(StackedParentsProvider(bzrlib.repository._LazyListJoin(([CachingParentsProvider(CallableToParentsProviderAdapter(<bound
method CHKInventoryRepository._get_parent_map_no_fallbacks of
CHKInventoryRepository('file:///home/phcoder/grub2/bzr/.bzr/repository/')>))],
[]))))".

Admittingly for disk/filesystems it's not viable and even for PCI it was
somewhat messy but may be viable in some cases like where we already
switch to FOR_* macros.

> 
> Please review.
> 
> Thanks,
> 
> 
> 
> 
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel



-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]