[prev in list] [next in list] [prev in thread] [next in thread] 

List:       uclibc
Subject:    Comments on new resolv.c additions
From:       vda.linux () googlemail ! com (Denys Vlasenko)
Date:       2011-09-14 13:19:42
Message-ID: CAK1hOcOW1CzCnVZTK8Z3R6nzgBgwMbq5pcLb08zr0sMfsaBqDw () mail ! gmail ! com
[Download RAW message or body]

On Sun, Sep 11, 2011 at 10:50 PM, Daniel Mack <zonque at gmail.com> wrote:
>> -extern struct _ns_flagdata _ns_flagdata[];
>> +extern const struct _ns_flagdata _ns_flagdata[];
>>
>> This table is used exactly in one place. You can make it static
>> (and smaller).
>
> I had quite some trouble getting this detail straight, I remember. The
> particular problem here is that ns_flagdata[] is accesses as an
> exernal array from applications,

Really? There are applications which use _ns_flagdata[]?
Despite this comment above it? -
/* Private data structure - do not use from outside library. */

Google code search did not find those apps for me.

> as the helper macros just dereference
> values from it. Hence, it can not be static, unfortunately.

I see no macros which reference _ns_flagdata[].
In fact, there is precisely one usage of the array
in the entire tree:

int ns_msg_getflag(ns_msg handle, int flag)
{
        return ((handle)._flags & _ns_flagdata[flag].mask) >>
_ns_flagdata[flag].shift;
}


-- 
vda

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic