diff options
-rw-r--r-- | src/bin/eolian/docs.c | 2 | ||||
-rw-r--r-- | src/bin/eolian/headers.c | 4 | ||||
-rw-r--r-- | src/bin/eolian/sources.c | 20 | ||||
-rw-r--r-- | src/bindings/luajit/eolian.lua | 6 | ||||
-rw-r--r-- | src/lib/eolian/Eolian.h | 4 | ||||
-rw-r--r-- | src/lib/eolian/database_function_api.c | 2 | ||||
-rw-r--r-- | src/lib/eolian_cxx/grammar/klass_def.hpp | 2 | ||||
-rw-r--r-- | src/scripts/pyolian/eolian.py | 4 | ||||
-rw-r--r-- | src/scripts/pyolian/eolian_lib.py | 6 | ||||
-rwxr-xr-x | src/scripts/pyolian/test_eolian.py | 2 | ||||
-rw-r--r-- | src/tests/eolian/eolian_parsing.c | 12 |
11 files changed, 32 insertions, 32 deletions
diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c index e497581e83..498278f0e1 100644 --- a/src/bin/eolian/docs.c +++ b/src/bin/eolian/docs.c @@ -570,7 +570,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid, } } - if (!eolian_function_is_class(fid)) + if (!eolian_function_is_static(fid)) { _indent_line(buf, indent); eina_strbuf_append(buf, " * @param[in] obj The object.\n"); diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c index a4a20c495c..3e433b5f29 100644 --- a/src/bin/eolian/headers.c +++ b/src/bin/eolian/headers.c @@ -129,13 +129,13 @@ _gen_func(const Eolian_State *state, const Eolian_Function *fid, eina_stringshare_del(fcn); Eina_Strbuf *flagbuf = NULL; - int nidx = !eolian_function_is_class(fid); + int nidx = !eolian_function_is_static(fid); eina_strbuf_append_char(buf, '('); if (nidx) { if ((ftype == EOLIAN_PROP_GET) || eolian_function_object_is_const(fid) - || eolian_function_is_class(fid)) + || eolian_function_is_static(fid)) { eina_strbuf_append(buf, "const "); } diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c index ccf5cc35e9..93d78ebbd7 100644 --- a/src/bin/eolian/sources.c +++ b/src/bin/eolian/sources.c @@ -570,7 +570,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, eina_strbuf_append(params, ", "); eina_strbuf_append(params, prn); - if (eina_strbuf_length_get(params_full) || !eolian_function_is_class(fid)) + if (eina_strbuf_length_get(params_full) || !eolian_function_is_static(fid)) { eina_strbuf_append(params_full, ", "); eina_strbuf_append(params_full_imp, ", "); @@ -660,7 +660,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, if (eina_strbuf_length_get(params)) eina_strbuf_append(params, ", "); - if (eina_strbuf_length_get(params_full_imp) || !eolian_function_is_class(fid)) + if (eina_strbuf_length_get(params_full_imp) || !eolian_function_is_static(fid)) eina_strbuf_append(params_full_imp, ", "); eina_strbuf_append(params_full_imp, ptn); if (!had_star) @@ -671,7 +671,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, eina_strbuf_append(params_full_imp, " EINA_UNUSED"); eina_strbuf_append(params, prn); - if (eina_strbuf_length_get(params_full) || !eolian_function_is_class(fid)) + if (eina_strbuf_length_get(params_full) || !eolian_function_is_static(fid)) eina_strbuf_append(params_full, ", "); eina_strbuf_append(params_full, ptn); if (!had_star) @@ -729,7 +729,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, { /* figure out the data type */ Eina_Stringshare *dt = NULL; - if (eolian_function_is_class(fid)) + if (eolian_function_is_static(fid)) dt = eina_stringshare_add("void"); else dt = eolian_class_c_data_type_get(cl); @@ -751,7 +751,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, eina_strbuf_append(buf, func_suffix); /* ([const ]Eo *obj, Data_Type *pd, impl_full_params); */ eina_strbuf_append_char(buf, '('); - if (!eolian_function_is_class(fid)) + if (!eolian_function_is_static(fid)) { if ((ftype == EOLIAN_PROP_GET) || eolian_function_object_is_const(fid)) eina_strbuf_append(buf, "const "); @@ -760,7 +760,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, eina_strbuf_append(buf, " *pd"); } eina_strbuf_append(buf, eina_strbuf_string_get(params_full_imp)); - if (eina_strbuf_length_get(params_full_imp) == 0 && eolian_function_is_class(fid)) + if (eina_strbuf_length_get(params_full_imp) == 0 && eolian_function_is_static(fid)) eina_strbuf_append(buf, "void"); eina_strbuf_append(buf, ");\n\n"); } @@ -832,7 +832,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, eina_stringshare_del(dt); } - if (impl_same_class && !eolian_function_is_class(fid)) + if (impl_same_class && !eolian_function_is_static(fid)) { /* generate reflection implementation */ if (reflect_type) @@ -875,7 +875,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, if (has_params) eina_strbuf_append_char(buf, 'V'); if ((ftype == EOLIAN_PROP_GET) || eolian_function_object_is_const(fid) - || eolian_function_is_class(fid)) + || eolian_function_is_static(fid)) { eina_strbuf_append(buf, "_CONST"); } @@ -909,7 +909,7 @@ _gen_func(const Eolian_Class *cl, const Eolian_Function *fid, eina_stringshare_del(eofn); } - if (impl_same_class && eolian_function_is_class(fid)) + if (impl_same_class && eolian_function_is_static(fid)) _emit_class_function(buf, fid, rtp, params_full, ocnamel, func_suffix, params, eolian_function_full_c_name_get(fid, ftype)); free(cname); @@ -1003,7 +1003,7 @@ _gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Hash *refh) Eolian_Function_Type ftype; const Eolian_Function *fid = eolian_implement_function_get(imp, &ftype); - if (eolian_function_is_class(fid)) continue; + if (eolian_function_is_static(fid)) continue; if (!eina_strbuf_length_get(ops)) eina_strbuf_append_printf(ops, " EFL_OPS_DEFINE(ops,\n"); diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua index 55ae838cd6..352057c184 100644 --- a/src/bindings/luajit/eolian.lua +++ b/src/bindings/luajit/eolian.lua @@ -366,7 +366,7 @@ ffi.cdef [[ const char *eolian_function_full_c_name_get(const Eolian_Function *function_id, Eolian_Function_Type ftype); const Eolian_Function *eolian_class_function_by_name_get(const Eolian_Class *klass, const char *func_name, Eolian_Function_Type f_type); const Eolian_Implement *eolian_function_implement_get(const Eolian_Function *function_id); - Eina_Bool eolian_function_is_class(const Eolian_Function *function_id); + Eina_Bool eolian_function_is_static(const Eolian_Function *function_id); Eina_Bool eolian_function_is_constructor(const Eolian_Function *function_id, const Eolian_Class *klass); Eina_Bool eolian_function_is_function_pointer(const Eolian_Function *function_id); Eina_Iterator *eolian_property_keys_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype); @@ -1201,8 +1201,8 @@ M.Function = ffi.metatype("Eolian_Function", { return v end, - is_class = function(self) - return eolian.eolian_function_is_class(self) ~= 0 + is_static = function(self) + return eolian.eolian_function_is_static(self) ~= 0 end, is_constructor = function(self, klass) diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h index 2c23da328e..970cc4c728 100644 --- a/src/lib/eolian/Eolian.h +++ b/src/lib/eolian/Eolian.h @@ -1741,14 +1741,14 @@ EAPI const Eolian_Function *eolian_class_function_by_name_get(const Eolian_Class EAPI const Eolian_Implement *eolian_function_implement_get(const Eolian_Function *function_id); /* - * @brief Get whether a function is a class method/property. + * @brief Get whether a function is a static method/property. * * @param[in] function_id Id of the function * @return EINA_TRUE and EINA_FALSE respectively * * @ingroup Eolian */ -EAPI Eina_Bool eolian_function_is_class(const Eolian_Function *function_id); +EAPI Eina_Bool eolian_function_is_static(const Eolian_Function *function_id); /* * @brief Get whether a function is beta. diff --git a/src/lib/eolian/database_function_api.c b/src/lib/eolian/database_function_api.c index 910f2b8462..104ac6e829 100644 --- a/src/lib/eolian/database_function_api.c +++ b/src/lib/eolian/database_function_api.c @@ -117,7 +117,7 @@ eolian_function_implement_get(const Eolian_Function *fid) } EAPI Eina_Bool -eolian_function_is_class(const Eolian_Function *fid) +eolian_function_is_static(const Eolian_Function *fid) { EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE); return fid->is_static; diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp index f96595bdc3..74375159a0 100644 --- a/src/lib/eolian_cxx/grammar/klass_def.hpp +++ b/src/lib/eolian_cxx/grammar/klass_def.hpp @@ -811,7 +811,7 @@ struct function_def } } is_protected = eolian_function_scope_get(function, type) == EOLIAN_SCOPE_PROTECTED; - is_static = eolian_function_is_class(function); + is_static = eolian_function_is_static(function); Eolian_Implement const* implement = eolian_function_implement_get(function); if (!implement) diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py index c287b57c35..8ec4716a67 100644 --- a/src/scripts/pyolian/eolian.py +++ b/src/scripts/pyolian/eolian.py @@ -865,8 +865,8 @@ class Function(Object): return self.scope_get(Eolian_Function_Type.PROP_SET) @cached_property - def is_class(self): - return bool(lib.eolian_function_is_class(self)) + def is_static(self): + return bool(lib.eolian_function_is_static(self)) @cached_property def object_is_const(self): diff --git a/src/scripts/pyolian/eolian_lib.py b/src/scripts/pyolian/eolian_lib.py index b9ba5f27fa..b532e98197 100644 --- a/src/scripts/pyolian/eolian_lib.py +++ b/src/scripts/pyolian/eolian_lib.py @@ -332,9 +332,9 @@ lib.eolian_function_full_c_name_get.restype = c_void_p # Stringshare TO BE FREE lib.eolian_function_implement_get.argtypes = (c_void_p,) lib.eolian_function_implement_get.restype = c_void_p -# EAPI Eina_Bool eolian_function_is_class(const Eolian_Function *function_id); -lib.eolian_function_is_class.argtypes = (c_void_p,) -lib.eolian_function_is_class.restype = c_bool +# EAPI Eina_Bool eolian_function_is_static(const Eolian_Function *function_id); +lib.eolian_function_is_static.argtypes = (c_void_p,) +lib.eolian_function_is_static.restype = c_bool # EAPI Eina_Bool eolian_function_is_constructor(const Eolian_Function *function_id, const Eolian_Class *klass); lib.eolian_function_is_constructor.argtypes = (c_void_p,c_void_p,) diff --git a/src/scripts/pyolian/test_eolian.py b/src/scripts/pyolian/test_eolian.py index b597e812b7..5313e4cbba 100755 --- a/src/scripts/pyolian/test_eolian.py +++ b/src/scripts/pyolian/test_eolian.py @@ -374,7 +374,7 @@ class TestEolianFunction(unittest.TestCase): self.assertIsNone(f.method_return_type) # TODO correct ? self.assertIsNone(f.setter_return_type) # TODO correct ? self.assertIsNone(f.getter_return_type) # TODO correct ? - self.assertFalse(f.is_class) + self.assertFalse(f.is_static) self.assertFalse(f.is_beta) self.assertFalse(f.is_constructor(cls)) # # #assert f.is_function_pointer == False # TODO broken somehow diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c index 7d680af4ec..9d6a219655 100644 --- a/src/tests/eolian/eolian_parsing.c +++ b/src/tests/eolian/eolian_parsing.c @@ -1005,22 +1005,22 @@ EFL_START_TEST(eolian_class_funcs) /* Class properties */ fail_if(eolian_class_function_by_name_get(class, "a", EOLIAN_PROPERTY)); fail_if(!(fid = eolian_class_function_by_name_get(class, "a", EOLIAN_PROP_GET))); - fail_if(!eolian_function_is_class(fid)); + fail_if(!eolian_function_is_static(fid)); fail_if(!(fid = eolian_class_function_by_name_get(class, "b", EOLIAN_PROP_GET))); - fail_if(eolian_function_is_class(fid)); + fail_if(eolian_function_is_static(fid)); /* Class methods */ fail_if(!(fid = eolian_class_function_by_name_get(class, "foo", EOLIAN_METHOD))); - fail_if(!eolian_function_is_class(fid)); + fail_if(!eolian_function_is_static(fid)); fail_if(eolian_function_scope_get(fid, EOLIAN_METHOD) != EOLIAN_SCOPE_PUBLIC); fail_if(!(fid = eolian_class_function_by_name_get(class, "bar", EOLIAN_METHOD))); - fail_if(eolian_function_is_class(fid)); + fail_if(eolian_function_is_static(fid)); fail_if(eolian_function_scope_get(fid, EOLIAN_METHOD) != EOLIAN_SCOPE_PUBLIC); fail_if(!(fid = eolian_class_function_by_name_get(class, "baz", EOLIAN_METHOD))); - fail_if(!eolian_function_is_class(fid)); + fail_if(!eolian_function_is_static(fid)); fail_if(eolian_function_scope_get(fid, EOLIAN_METHOD) != EOLIAN_SCOPE_PROTECTED); fail_if(!(fid = eolian_class_function_by_name_get(class, "bah", EOLIAN_METHOD))); - fail_if(eolian_function_is_class(fid)); + fail_if(eolian_function_is_static(fid)); fail_if(eolian_function_scope_get(fid, EOLIAN_METHOD) != EOLIAN_SCOPE_PROTECTED); eolian_state_free(eos); |