[OPEN-ILS-DEV] PATCH: osrf_list.[ch] (miscellaneous)

Mike Rylander mrylander at gmail.com
Mon Dec 31 21:35:16 EST 2007


On Dec 30, 2007 1:14 PM, Scott McKellar <mck9 at swbell.net> wrote:
> These patches tidy up various things.
>
> 1. I moved the macros OSRF_LIST_DEFAULT_SIZE and OSRF_LIST_INC_SIZE
> from the header into the implementation file.  No other source files
> reference them, nor should they.
>
> 2. I moved the OSRF_LIST_MAX_SIZE macro into the implementation file
> as well, and then commented it out.  It is nowhere referenced, but
> out of caution I preserved it like a fly in amber.

I'm holding back this patch, and the similar parts of the patch to
osrf_hash.[ch] until I can get a wee bit of feedback.

I wonder if what we want is a build-time-knobs.h to hold build-time
tunable settings that we don't want to hard-code and for whatever
reason we may want to tweak in the future (better cache-line
alignment, different architectures, embedded environments, other stuff
I'm not thinking of right now...).

Opinions?

(Not applied for now ... I can tease the bits apart later after discussion.)

[snip]

>
> In the header, a comment says that osrfListGetCount returns "The
> number of non-null items in the list."  This comment is not accurate.
> The function returns the number of items in the list, excluding
> trailing NULLs.  If there are any NULLs preceding the last non-NULL
> pointer, they are included in the count.
>
> I left this function alone, because I didn't know whether to fix the
> function or the comment.
>

The comment is wrong and should be fixed.  Good catch.

> Scott McKellar
> http://home.swbell.net/mck9/ct/
>
> Developer's Certificate of Origin 1.1 By making a contribution to
> this project, I certify that:
>
> (a) The contribution was created in whole or in part by me and I
> have the right to submit it under the open source license indicated
> in the file; or
>
> (b) The contribution is based upon previous work that, to the best
> of my knowledge, is covered under an appropriate open source license
> and I have the right under that license to submit that work with
> modifications, whether created in whole or in part by me, under the
> same open source license (unless I am permitted to submit under a
> different license), as indicated in the file; or
>
> (c) The contribution was provided directly to me by some other person
> who certified (a), (b) or (c) and I have not modified it; and
>
> (d) In the case of each of (a), (b), or (c), I understand and agree
> that this project and the contribution are public and that a record
> of the contribution (including all personal information I submit
> with it, including my sign-off) is maintained indefinitely and may
> be redistributed consistent with this project or the open source
> license indicated in the file.



-- 
Mike Rylander
 | VP, Research and Design
 | Equinox Software, Inc. / The Evergreen Experts
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  miker at esilibrary.com
 | web:  http://www.esilibrary.com


More information about the Open-ils-dev mailing list