Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
51221d85
Commit
51221d85
authored
Dec 07, 2015
by
Thomas Jahns
🤸
Browse files
Switch grib_api grid template to dynamic memory.
parent
28936598
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_gribapi.c
View file @
51221d85
...
...
@@ -459,10 +459,11 @@ void gribapiAddRecord(stream_t * streamptr, int param, grib_handle *gh,
// I. e. kick the fixed size array and allocate enough space, whatever that may be.
strncpy
(
record
->
varname
,
varname
,
sizeof
(
record
->
varname
));
grid_t
grid
;
gribapiGetGrid
(
gh
,
&
grid
);
grid_t
*
grid
=
(
grid_t
*
)
Malloc
(
sizeof
(
*
grid
))
;
gribapiGetGrid
(
gh
,
grid
);
int
gridID
=
varDefGrid
(
vlistID
,
&
grid
,
0
);
int
gridID
=
varDefGrid
(
vlistID
,
grid
,
0
);
Free
(
grid
);
int
zaxistype
=
gribapiGetZaxisType
(
gribEditionNumber
(
gh
),
leveltype1
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment