[PATCH 04/15] score: Add node adjust to _RBTree_Find_inline()
Gedare Bloom
gedare at rtems.org
Tue Apr 5 17:09:15 UTC 2016
map might be fine. some other possibilities: index, offset, field.
I just noticed though that this proposed callout seems somewhat
awkward since it will return a void* pointing to something not a node,
and the return likely goes to something expecting an RBTree_Node*? Why
not leave it to the caller of Find() to do the end conversion to the
data element embedded in the node that gets found?
On Tue, Apr 5, 2016 at 12:42 PM, Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
> Maybe "map"?
>
> ----- Gedare Bloom <gedare at rtems.org> schrieb:
>> On Tue, Apr 5, 2016 at 11:35 AM, Sebastian Huber
>> <sebastian.huber at embedded-brains.de> wrote:
>> >
>> > ----- Gedare Bloom <gedare at rtems.org> schrieb:
>> >> I don't understand the name "adjust"? I think of adjusting as
>> >> something that would cause a change or modify, which is not the case
>> >> here. I don't have any great replacement, but I guess I might suggest
>> >> "dereference"?
>> >
>> > You may adjust the pointer value, e.g. node + offset. Dereference is wrong, since you are not supposed to do a *node. Maybe "fixup"?
>> >
>> As I understand it, this callout does not modify the tree or node, so
>> I would avoid using any verb that implies a change happens: fixup
>> implies some modification to me. Perhaps I misunderstood, but the
>> comment says the callout should "get the return value" of a found
>> node. get_value() would be OK except for slight overload with POSIX
>> keys. read()?
>>
>> I'm not coming up with any great ideas.
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone : +49 89 189 47 41-16
> Fax : +49 89 189 47 41-09
> E-Mail : sebastian.huber at embedded-brains.de
> PGP : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list