[OPEN-ILS-DEV] PATCH: osrf_router.[ch] (const-correctness).

Scott McKellar mck9 at swbell.net
Sun Nov 11 16:37:24 EST 2007


This patch adds the const qualifier to a number of function parameters.

In one of the affected functions (osrfRouterAddClass), I added a cast 
to remove the constness from the classname parameter when passing it
to osrfRouterClassFree().  This cast is ugly but harmless, because
osrfRouterClassFree() treats the pointer as if it were const anyway.

I would have liked to add the const to the corresponding parameter of
osrfRouterClassFree().  However this function can be invoked through a
function pointer.  If I added the const, the signature of the function
would no longer match the signature of the function pointer,  We
could probably change the signature of the function pointer, but that
would involve more complications than I want to wrestle with right
now.

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osrf_router_h_1.patch
Type: text/x-patch
Size: 5926 bytes
Desc: 1257961298-osrf_router_h_1.patch
Url : http://list.georgialibraries.org/pipermail/open-ils-dev/attachments/20071111/97054e2e/osrf_router_h_1.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osrf_router_c_1.patch
Type: text/x-patch
Size: 6281 bytes
Desc: 71177278-osrf_router_c_1.patch
Url : http://list.georgialibraries.org/pipermail/open-ils-dev/attachments/20071111/97054e2e/osrf_router_c_1.bin


More information about the Open-ils-dev mailing list