#1974 closed defect (fixed)
FeatureDefn without a name cannot be created
Reported by: | Ari Jolma | Owned by: | Ari Jolma |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | PerlBindings | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
This is the side-effect of having a (very general) typemap in Perl bindings that checks for non-nullness of all const char *name's. I will fix this by renaming the parameter.
ogr.i has quite a few checks against nullness of names. These could be removed in favor of a typemap which checks the same thing. At least they are not needed any more from the Perl point of view. I have quite many of these checks in Perl typemaps. Maybe I should add them to the README.typemaps (currently there are no check typemaps there)? This also would set a parameter naming policy for the bindings.
Change History (4)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
hm, maybe it does; what if other is renamed to other_disown in AddGeometryDirectly and non-nullness check is also added for other_disown?
OTH, hNewSubGeom could be checked against nullness in ogr_api.cpp:539
Damn! I just noticed a problem with the check typemaps approach. In the apply DISOWN .. clear pattern that appears for example in AddGeometryDirectly, the "clear" also clears the check typemap. The check typemaps, or the idea of checking non-nullness just by the nameof the parameter, thus does not seem to work.