[postgis-devel] loader incompatibility

Markus Schaber schabi at logix-tt.com
Tue Apr 5 11:55:21 PDT 2005


Hi, Strk,

strk at refractions.net schrieb:

> That's not what I had in mind.
> Are num_entitities, j and trans needed by outside code ?

I just had a closer look at the code, it seems that some general
clean-up would be good. :-)

j is needed by outside code as it is the row count that is used to
update the SQL SERIAL / Sequence in -c / -d mode. From looking at the
code, I think that this might be replaced by num_entities directly.

num_entities is set outside (by SHPGetInfo) and needed both outside and
inside the new function, so it makes sense to pass it in as parameter or
keep it as global.

trans is initialized to 0 outside, but then only accessed inside. It
thus can be a local variable.


The attached patch cleans this up. I initially wanted to keep the patch
as simple as possible, but maybe it is better to keep the code as simple
as possible.

Markus





-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: prepare6.diff
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20050405/ca60b414/attachment.ksh>


More information about the postgis-devel mailing list