@@ -120,7 +120,7 @@ int fix_fortran_dims(Node *n, const char *tmap_name, String *typemap) {
120
120
int ndim = SwigType_array_ndim (t);
121
121
for (int i = 0 ; i < ndim; i++) {
122
122
String *dim = SwigType_array_getdim (t, i);
123
- if (dim && !is_fortran_intexpr (dim)) {
123
+ if (dim && Len (dim) > 0 && !is_fortran_intexpr (dim)) {
124
124
Swig_warning (WARN_LANG_IDENTIFIER, input_file, line_number,
125
125
" Array dimension expression '%s' is incompatible with Fortran\n " ,
126
126
dim);
@@ -2864,7 +2864,6 @@ int FORTRAN::constantWrapper(Node *n) {
2864
2864
// Save some properties that get temporarily changed
2865
2865
Swig_save (" constantWrapper" , n, " wrap:name" , " lname" , " fortran:name" , NULL );
2866
2866
2867
- String *nodetype = nodeType (n);
2868
2867
String *value = NULL ;
2869
2868
2870
2869
if (String *override_value = Getattr (n, " feature:fortran:constvalue" )) {
@@ -2874,6 +2873,7 @@ int FORTRAN::constantWrapper(Node *n) {
2874
2873
value = Getattr (n, " rawval" );
2875
2874
}
2876
2875
2876
+ String *nodetype = nodeType (n);
2877
2877
if (Strcmp (nodetype, " enumitem" ) == 0 ) {
2878
2878
// Set type from the parent enumeration
2879
2879
// XXX why??
0 commit comments