-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use NULL and drop SHPLIB_NULLPTR #25
Comments
If there is a need to build shapelib as C++, I think it should just shift to C++ for the library code with a C linkage API. I'd like to hear what drove having it compile as both C and C++. |
I found one place that uses shapelib as C++: |
It's now exactly in one place: shapefil_private.h |
hum, at some point, I certainly did it. Not sure why it didn't materialize in the build system. Anyway now it will per OSGeo/gdal#9436. I've found that building in C++ mode helps finding issues that a C compiler doesn't report. |
SHPLIB_NULLPTR
is defined in a number of places. e.g.shpopen.c
This doesn't buy much as there is not mechanism in shapelib to build as C++. If the internals are ever converted to C++, then most of the
NULL
s should be converted to nullptr. The idea of having it both ways just adds complexity. Currently:@rouault added the cast macros and
SHPLIB_NULLPTR
in 8ba2778. However, looking at gdal/ogr/ogrsf_frmts/shape, it doesn't currently look like shapelib is being built as C++ in sGDALThe text was updated successfully, but these errors were encountered: