[OPEN-ILS-DEV] PATCH: osrf_version.c

Mike Rylander mrylander at gmail.com
Sun Nov 4 08:24:58 EST 2007


On 10/28/07, Scott McKellar <mck9 at swbell.net> wrote:
> This patch declares four internal pointer variables as const.
>
> Each of these pointers is assigned a return value from either
> jsonObjectGetIndex() or jsonObjectGetString().  By declaring them
> const we prepare for the day when these functions are redefined to
> return const pointers.
>
> This patch relies on a previous patch to osrf_app_session.[ch],
> which hasn't been applied yet.
>

I'm going through your back patches while I have a few free minutes.
They'll all be going in as one big commit later on today.

> -----------
>
> Is there a good reason why the functions defined in osrf_version.c
> are not prototyped in any header?  The policy appears to be to
> prototype them separately in every file that references them.
>

This source in c-apps (in both the OpenSRF and ILS repos) define
modules which are loaded by the main OpenSRF infrastructure to provide
methods.  It's up to the application author, of course, to decide if
any of the functions the implementation module provides would be
generally useful (and without a lot of heavy evironment mock-up), but
the main purpose is to have a shared object file that has a well-known
initializer and that can be dlopen'd by OpenSRF.  It looks like Bill
just found the function in there less than general enough. :)

Is that what you mean?

Also, thanks as always!  All this should end up making the OpenSRF
apps much safer, and hopefully easier to write.

-- 
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