ext/gdal-ruby/ogr/ogr.cpp in gdal-1.0.0 vs ext/gdal-ruby/ogr/ogr.cpp in gdal-2.0.0
- old
+ new
@@ -6,13 +6,14 @@
* coding conventions designed to improve portability and efficiency. Do not make
* changes to this file unless you know what you are doing--modify the SWIG
* interface file instead.
* ----------------------------------------------------------------------------- */
+#include "cpl_port.h"
+
#define SWIGRUBY
-
#ifdef __cplusplus
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
struct SwigMovePointer {
T *ptr;
@@ -1854,12 +1855,13 @@
#include <iostream>
using namespace std;
+#define CPL_SUPRESS_CPLUSPLUS
#include "ogr_api.h"
-#include "ogr_p.h"
+/* #include "ogr_p.h" */
#include "ogr_core.h"
#include "cpl_port.h"
#include "cpl_string.h"
#include "ogr_srs_api.h"
@@ -3216,11 +3218,12 @@
char **GeneralCmdLineProcessor( char **papszArgv, int nOptions = 0 ) {
int nResArgCount;
- nResArgCount =
- OGRGeneralCmdLineProcessor( CSLCount(papszArgv), &papszArgv, nOptions );
+ nResArgCount = 0;
+ /* TODO(zhm) REMOVED because this is not part of the C API in 2.x */
+ /* OGRGeneralCmdLineProcessor( CSLCount(papszArgv), &papszArgv, nOptions ); */
if( nResArgCount <= 0 )
return NULL;
else
return papszArgv;