RFC-24: published implementation proposal on bugzilla

Steve Lime Steve.Lime at DNR.STATE.MN.US
Tue Mar 13 22:25:29 EDT 2007


If we're going to do this, then the sooner the better since it touches so much code. (I see lots of conflicts in my future with the RFC 19 changes I haven't committed.)

Steve

>>> Umberto Nicoletti <umberto.nicoletti at GMAIL.COM> 03/13/07 2:30 PM >>>
I've put some more effort in preparing a demo of how rfc-24 would be
implemented.

I've attached a new patch to

 http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=2032

that implements:

1. classes as array of pointers
2. dynamic classes
3. reference counting for most classes operations (see the python test
case for what's been done)
4. more python unit tests to cover the new class code
5. fixed some memory leaks (some introduced by the previous patches,
some already there)

Apply the new patch 636 after 632 and 633 to mapserver head (inside
the mapserver directory):

patch -l -p0 < 632.patch
patch -l -p0 < 633.patch
patch -l -p1 < this.patch

Note the -p1 switch on the last patch command. Last patch will
complain about maplayer.c, please  answer as follows:
assume reverse: n
apply anyway: y

You can safely ignore errors for now as they're only comments or indentation.
There's a lot of activity going on on cvs in these days so it could be
that in the next the few days it will be more difficult to apply the
patches.

At this point I think there is enough code to look at to plan the
opening of a voting thread on rfc-24 at the end of next week (around
March 23). If your schedule is too busy I can consider delaying the
voting session of course.

Best regards,
Umberto


On 3/4/07, Umberto Nicoletti <umberto.nicoletti at gmail.com> wrote:
> I have been working on an example implementation of rfc-24 and the
> fruit of my labor is attachment #632 to:
> http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=2032
>
> Direct link:
> http://mapserver.gis.umn.edu/bugs/attachment.cgi?id=632&action=view
>
> Apply this patch to cvs HEAD to see how rfc24 would be implemented.
> The patch only modifies the map and layer objects, the rest is still unmodified.
>
> Key points:
> 1. refactor map->layers to be an array of pointers instead of a array of structs
> 2. allocation of a new layerObj only happens when needed, thus conserving memory
> (allowing for large values of MAX_NUM_LAYERS with minimal waste of memory)
> 3. wrap map->layers access with GET_LAYER macros to ease future developments
> (i.e. removal of MAX_NUM_LAYERS)
> 4. check that layer->map is not null before using it and raise a new
> error if it is (MS_NULLPARENTERR)
> 5. reference counter for mapObj and layerObj
> 6. modification of mapserver core and swig interface files to do reference
> counting for map and layers (incr and decr)
> 7. created unit tests for python (mapscript/python/tests/cases/refcount.py) to
> test the functionality of the previous items. This has not been added to
> runtests.py yet
>
> Due to the large extent of the changes I have also made available
> items 1,2,3 and item 4 available as two separate patches.
>
> Happy hacking and tell me what you think,
> Umberto
>



More information about the mapserver-dev mailing list