Commit d41a436a authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

declare gridHandle as void* if grib_api is not available

parent da61357c
static int dummy;
#ifdef HAVE_LIBGRIB_API
#include "gribapi_utilities.h"
......
#ifdef HAVE_LIBGRIB_API
#include "iterator_grib.h"
#include "cdi_int.h"
......@@ -17,6 +15,8 @@
#include <string.h>
#ifdef HAVE_LIBGRIB_API
//Since the error handling in constructors is usually very closely related to the workings of a destructor,
//this function combines both functions in one, using a centralized exit.
//The mode of operation depends on whether me is a NULL pointer on entry:
......@@ -127,6 +127,7 @@ char* cdiGribIterator_serialize(CdiIterator* super)
free(escapedPath);
return result;
}
#endif
CdiGribIterator* cdiGribIterator_deserialize(const char* description)
{
......@@ -170,6 +171,7 @@ fail:
return NULL;
}
#ifdef HAVE_LIBGRIB_API
static void cdiGribIterator_ensureBuffer(CdiGribIterator* me, size_t requiredSize)
{
if(me->bufferSize < requiredSize)
......
......@@ -24,6 +24,8 @@ typedef struct CdiGribIterator {
size_t bufferSize, curRecordSize;
#ifdef HAVE_LIBGRIB_API
grib_handle* gribHandle;
#else
void* gribHandle;
#endif
} CdiGribIterator;
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment