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
2987efc5
Commit
2987efc5
authored
Aug 09, 2019
by
Ralf Mueller
🎣
Browse files
updates for swig 4.0.0
parent
2ec851cb
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
interfaces/python/CdiLib.py
View file @
2987efc5
This diff is collapsed.
Click to expand it.
interfaces/python/cdilib_wrap.c
View file @
2987efc5
This diff is collapsed.
Click to expand it.
interfaces/python/testLib.py
View file @
2987efc5
...
...
@@ -4,6 +4,6 @@ streamID = CdiLib.streamOpenRead(ifile)
vlistID
=
CdiLib
.
streamInqVlist
(
streamID
)
nvars
=
CdiLib
.
vlistNvars
(
vlistID
)
for
i
in
range
(
0
,
nvars
):
print
CdiLib
.
vlistInqVarCode
(
vlistID
,
i
)
,
print
(
CdiLib
.
vlistInqVarCode
(
vlistID
,
i
)
)
CdiLib
.
streamClose
(
streamID
)
interfaces/ruby/cdilib_wrap.c
View file @
2987efc5
This diff is collapsed.
Click to expand it.
interfaces/ruby/cdiobj_wrap.cpp
View file @
2987efc5
...
...
@@ -29009,7 +29009,7 @@ _wrap_CdiTaxis_name_set(int argc, VALUE *argv, VALUE self) {
char *arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
char temp2[
128
] ;
char temp2[
CDI_MAX_NAME
] ;
int res2 ;
if ((argc < 1) || (argc > 1)) {
...
...
@@ -29020,13 +29020,13 @@ _wrap_CdiTaxis_name_set(int argc, VALUE *argv, VALUE self) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "CdiTaxis *","name", 1, self ));
}
arg1 = reinterpret_cast< CdiTaxis * >(argp1);
res2 = SWIG_AsCharArray(argv[0], temp2,
128
);
res2 = SWIG_AsCharArray(argv[0], temp2,
CDI_MAX_NAME
);
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char [
128
]","name", 2, argv[0] ));
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char [
CDI_MAX_NAME
]","name", 2, argv[0] ));
}
arg2 = reinterpret_cast< char * >(temp2);
if (arg2) memcpy(arg1->name,arg2,
128
*sizeof(char));
else memset(arg1->name,0,
128
*sizeof(char));
if (arg2) memcpy(arg1->name,arg2,
CDI_MAX_NAME
*sizeof(char));
else memset(arg1->name,0,
CDI_MAX_NAME
*sizeof(char));
return Qnil;
fail:
return Qnil;
...
...
@@ -29051,7 +29051,7 @@ _wrap_CdiTaxis_name_get(int argc, VALUE *argv, VALUE self) {
arg1 = reinterpret_cast< CdiTaxis * >(argp1);
result = (char *)(char *) ((arg1)->name);
{
size_t size = SWIG_strnlen(result,
128
);
size_t size = SWIG_strnlen(result,
CDI_MAX_NAME
);
...
...
@@ -33568,7 +33568,6 @@ SWIGEXPORT void Init_CdiObj(void) {
SwigClassGridsMap.mark = 0;
SwigClassGridsMap.destroy = (void (*)(void *)) free_std_map_Sl_int_Sc_CdiGrid_Sg_;
SwigClassGridsMap.trackObjects = 0;
rb_define_const(mCdiObj, "CHARSIZE", SWIG_From_int(static_cast< int >(128)));
SwigClassCdiGrid.klass = rb_define_class_under(mCdiObj, "CdiGrid", rb_cObject);
SWIG_TypeClientData(SWIGTYPE_p_CdiGrid, (void *) &SwigClassCdiGrid);
interfaces/ruby/testLib.rb
View file @
2987efc5
require
'CdiLib'
require
'
./
CdiLib'
include
CdiLib
ifile
=
ARGV
[
0
].
nil?
?
"../testdata/mulval.nc"
:
ARGV
[
0
]
streamID
=
streamOpenRead
(
ifile
)
...
...
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