mirror of https://github.com/ecmwf/eccodes.git
Merge branch 'develop' of ssh://git.ecmwf.int:7999/eccodes/eccodes into develop
This commit is contained in:
commit
0882cc8e51
|
@ -185,12 +185,12 @@ static int unpack_long(grib_accessor* a, long* val, size_t* len)
|
||||||
|
|
||||||
/*TODO implement the dirty mechanism to avoid to unpack every time */
|
/*TODO implement the dirty mechanism to avoid to unpack every time */
|
||||||
err = grib_get_size(grib_handle_of_accessor(a), self->vector, &size);
|
err = grib_get_size(grib_handle_of_accessor(a), self->vector, &size);
|
||||||
DebugAssert(!err);
|
if (err) return err;
|
||||||
DebugAssert(size > 0);
|
DebugAssert(size > 0);
|
||||||
vector = (long*)grib_context_malloc(a->context, sizeof(long) * size);
|
vector = (long*)grib_context_malloc(a->context, sizeof(long) * size);
|
||||||
err = grib_unpack_long(va, vector, &size);
|
err = grib_unpack_long(va, vector, &size);
|
||||||
DebugAssert(!err);
|
|
||||||
grib_context_free(a->context, vector);
|
grib_context_free(a->context, vector);
|
||||||
|
if (err) return err;
|
||||||
|
|
||||||
*val = v->v[self->index];
|
*val = v->v[self->index];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue