Re: [PATCH 1/1] platform: extract common fields of IPv4/IPv6 addresses and routes to base struct
- From: Dan Winship <danw gnome org>
- To: Thomas Haller <thaller redhat com>, Dan Williams <dcbw redhat com>
- Cc: Network Manager <networkmanager-list gnome org>
- Subject: Re: [PATCH 1/1] platform: extract common fields of IPv4/IPv6 addresses and routes to base struct
- Date: Mon, 07 Apr 2014 14:10:50 -0400
On 04/04/2014 05:46 PM, Thomas Haller wrote:
On Fri, 2014-04-04 at 16:24 -0500, Dan Williams wrote:
On Fri, 2014-04-04 at 23:02 +0200, Thomas Haller wrote:
On Fri, 2014-04-04 at 15:13 -0500, Dan Williams wrote:
Is the only reason for the #define of the common fields so that you
don't have to do another level of indirection? It looks somewhat ugly
and my personal preference would be to just declare the base struct in
the functions you want to use it in and up-cast if you need the v4 or v6
version... kinda like we do with objects. So I certainly agree with
the principle, but lets see what other people say about the
implementation...
I see, but the disadvantage is, that I would have to fixup *many*
occurrences in existing code. Also, it is more typing.
But many of those existing occurrences involve separate IPv4 and IPv6
functions / codepaths where the actual behavior is exactly the same and
ought to be merged into a single NMPlatformIPAddress codepath anyway...
-- Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]