Fixed ECPG to correctly handle out-of-scope cursor declarations with pointers
authorMichael Meskes
Mon, 11 Sep 2017 19:10:36 +0000 (21:10 +0200)
committerMichael Meskes
Mon, 18 Sep 2017 21:08:17 +0000 (23:08 +0200)
or array variables.

src/interfaces/ecpg/preproc/ecpg.header

index cca3859a4230a6da49da1a345dc247a496e42270..85ead7553b421912152d969a1e6092129ab6a227 100644 (file)
@@ -350,7 +350,7 @@ adjust_outofscope_cursor_vars(struct cursor *cur)
                else
                {
                    newvar = new_variable(cat_str(4, mm_strdup("("),
-                                                 mm_strdup(ecpg_type_name(ptr->variable->type->type)),
+                                                 mm_strdup(ecpg_type_name(ptr->variable->type->u.element->type)),
                                                  mm_strdup(" *)(ECPGget_var("),
                                                  mm_strdup(var_text)),
                                          ECPGmake_array_type(ECPGmake_simple_type(ptr->variable->type->u.element->type,