RFC-24: published implementation proposal on bugzilla

Tamas Szekeres szekerest at GMAIL.COM
Thu Mar 15 16:13:26 EDT 2007


Umberto,

Currently I cannot see the exact match between the actual
implementation and the proposal described in rfc24.
Additionally I feel that this implementation is incomplete as it stands now.

Here are some raisings about the changes (without ranking by the importance)

1. The changes affecting the target language code is mostly missing.
In one hand you can force the ownership at the wrapper using the
%newobject feature like:

%newobject getLayer;
  layerObj *getLayer(int i) {
    if(i >= 0 && i < self->numlayers) {
    	MS_REFCNT_INCR(self->layers[i]);
      	return (self->layers[i]); /* returns an EXISTING layer */
    } else {
      return NULL;
    }
  }

but this philosophy is not reflected by some other functions returning
objects as:

layerObj *getLayerByName(char *name) {
    int i;

    i = msGetLayerIndex(self, name);

    if(i != -1)
      return (self->layers[i]); /* returns an EXISTING layer */
    else
      return NULL;
  }



More information about the mapserver-dev mailing list