summaryrefslogtreecommitdiff
path: root/src/lib/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2020-01-10 20:02:41 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2020-01-10 20:19:47 +0100
commit918987ef8aa3b5a5ae145530d23d6857b771f32f (patch)
treee0c61bfbcf3754c9c7a6ef8346d9462be1b994d9 /src/lib/eolian
parente55f0a1dcfdc36690cb43301a4cf5a3b6227a33c (diff)
eolian: fix parsing of c_name tags
It was not properly consuming the ending ) token.
Diffstat (limited to 'src/lib/eolian')
-rw-r--r--src/lib/eolian/eo_parser.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 253e99e929..730669b295 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -219,6 +219,7 @@ parse_c_name(Eo_Lexer *ls)
219 check_match(ls, ')', '(', pline, pcol); 219 check_match(ls, ')', '(', pline, pcol);
220 return NULL; /* unreachable */ 220 return NULL; /* unreachable */
221 } 221 }
222 eo_lexer_get(ls);
222 return cname; 223 return cname;
223} 224}
224 225
@@ -481,10 +482,7 @@ parse_struct(Eo_Lexer *ls, const char *name, Eina_Bool is_extern,
481 def->ownable = EINA_TRUE; 482 def->ownable = EINA_TRUE;
482 } 483 }
483 if (cname) 484 if (cname)
484 { 485 def->base.c_name = eina_stringshare_ref(cname);
485 def->base.c_name = cname;
486 eo_lexer_dtor_pop(ls);
487 }
488 else 486 else
489 def->base.c_name = make_c_name(name); 487 def->base.c_name = make_c_name(name);
490 /* we can't know the order, pop when both are filled */ 488 /* we can't know the order, pop when both are filled */
@@ -865,7 +863,7 @@ tags_done:
865 def->base.name = eina_stringshare_add(eina_strbuf_string_get(buf)); 863 def->base.name = eina_stringshare_add(eina_strbuf_string_get(buf));
866 if (cname) 864 if (cname)
867 { 865 {
868 def->base.c_name = cname; 866 def->base.c_name = eina_stringshare_ref(cname);
869 eo_lexer_dtor_pop(ls); 867 eo_lexer_dtor_pop(ls);
870 } 868 }
871 else 869 else
@@ -922,7 +920,7 @@ tags_done:
922 def->base.name = eina_stringshare_add(eina_strbuf_string_get(buf)); 920 def->base.name = eina_stringshare_add(eina_strbuf_string_get(buf));
923 if (cname) 921 if (cname)
924 { 922 {
925 def->base.c_name = cname; 923 def->base.c_name = eina_stringshare_ref(cname);
926 eo_lexer_dtor_pop(ls); 924 eo_lexer_dtor_pop(ls);
927 } 925 }
928 else 926 else
@@ -986,7 +984,7 @@ tags_done:
986 def->base.name = eina_stringshare_add(eina_strbuf_string_get(buf)); 984 def->base.name = eina_stringshare_add(eina_strbuf_string_get(buf));
987 if (cname) 985 if (cname)
988 { 986 {
989 def->base.c_name = cname; 987 def->base.c_name = eina_stringshare_ref(cname);
990 eo_lexer_dtor_pop(ls); 988 eo_lexer_dtor_pop(ls);
991 } 989 }
992 else 990 else
@@ -1448,7 +1446,7 @@ tags_done:
1448 def->base.name = eina_stringshare_add(eina_strbuf_string_get(buf)); 1446 def->base.name = eina_stringshare_add(eina_strbuf_string_get(buf));
1449 if (cname) 1447 if (cname)
1450 { 1448 {
1451 def->base.c_name = cname; 1449 def->base.c_name = eina_stringshare_ref(cname);
1452 eo_lexer_dtor_pop(ls); 1450 eo_lexer_dtor_pop(ls);
1453 } 1451 }
1454 else 1452 else
@@ -2263,7 +2261,7 @@ tags_done:
2263 ls->klass->base.name = eina_stringshare_add(eina_strbuf_string_get(buf)); 2261 ls->klass->base.name = eina_stringshare_add(eina_strbuf_string_get(buf));
2264 if (cname) 2262 if (cname)
2265 { 2263 {
2266 ls->klass->base.c_name = cname; 2264 ls->klass->base.c_name = eina_stringshare_ref(cname);
2267 eo_lexer_dtor_pop(ls); 2265 eo_lexer_dtor_pop(ls);
2268 } 2266 }
2269 else 2267 else
@@ -2490,7 +2488,7 @@ postparams:
2490 } 2488 }
2491 def->base.name = name; 2489 def->base.name = name;
2492 if (cname) 2490 if (cname)
2493 def->base.c_name = cname; 2491 def->base.c_name = eina_stringshare_ref(cname);
2494 /* we can't know the order, pop when both are filled */ 2492 /* we can't know the order, pop when both are filled */
2495 if (freefunc && cname) 2493 if (freefunc && cname)
2496 { 2494 {