summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2017-02-13 19:24:53 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2017-02-22 18:56:30 -0300
commitadd91ee80e0ba7814ea266a46d5b2a59ac15e6d1 (patch)
treee56570166b486013a0d0b418f2723d920309fa5b
parent4f327dc04e3b986b20e0001577e860084eefc620 (diff)
eolian_js: Avoid errors when getting function scope
-rw-r--r--src/bin/eolian_js/main.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/bin/eolian_js/main.cc b/src/bin/eolian_js/main.cc
index db5fa16546..a9b5de489d 100644
--- a/src/bin/eolian_js/main.cc
+++ b/src/bin/eolian_js/main.cc
@@ -355,6 +355,16 @@ _function_is_generatable(const Eolian_Function *function, Eolian_Function_Type f
355 return rtp ? _type_is_generatable(rtp, false) : true; 355 return rtp ? _type_is_generatable(rtp, false) : true;
356} 356}
357 357
358bool
359_function_is_public(const Eolian_Function *function, Eolian_Function_Type t)
360{
361 if (t == EOLIAN_PROPERTY)
362 return _function_is_public(function, EOLIAN_PROP_GET) || _function_is_public(function, EOLIAN_PROP_SET);
363 else
364 return eolian_function_scope_get(function, t) == EOLIAN_SCOPE_PUBLIC;
365}
366
367
358void separate_functions(Eolian_Class const* klass, Eolian_Function_Type t, bool ignore_constructors, 368void separate_functions(Eolian_Class const* klass, Eolian_Function_Type t, bool ignore_constructors,
359 std::vector<Eolian_Function const*>& constructor_functions, 369 std::vector<Eolian_Function const*>& constructor_functions,
360 std::vector<Eolian_Function const*>& normal_functions) 370 std::vector<Eolian_Function const*>& normal_functions)
@@ -364,7 +374,7 @@ void separate_functions(Eolian_Class const* klass, Eolian_Function_Type t, bool
364 for(; first != last; ++first) 374 for(; first != last; ++first)
365 { 375 {
366 Eolian_Function const* function = &*first; 376 Eolian_Function const* function = &*first;
367 if(eolian_function_scope_get(function, t) == EOLIAN_SCOPE_PUBLIC) 377 if (_function_is_public(function, t))
368 { 378 {
369 EINA_CXX_DOM_LOG_WARN(eolian::js::domain) << ::eolian_function_full_c_name_get(function, t, EINA_FALSE); 379 EINA_CXX_DOM_LOG_WARN(eolian::js::domain) << ::eolian_function_full_c_name_get(function, t, EINA_FALSE);
370 if(strcmp("elm_obj_entry_input_panel_imdata_get", ::eolian_function_full_c_name_get(function, t, EINA_FALSE)) != 0 && 380 if(strcmp("elm_obj_entry_input_panel_imdata_get", ::eolian_function_full_c_name_get(function, t, EINA_FALSE)) != 0 &&