summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2017-08-30 19:31:23 +0200
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2017-08-30 19:46:41 +0200
commit10fd3c32e825842c837fbfb68094ef7f2e4ae9e5 (patch)
tree72ab649063de081017148e529a109acfce3ef821 /src
parent4406d7098cb37dc8597589c1254adf8f3b3197a4 (diff)
downloadefl-10fd3c32e825842c837fbfb68094ef7f2e4ae9e5.tar.gz
eolian: remove c_only
Unused and of questionable value.
Diffstat (limited to 'src')
-rw-r--r--src/bindings/luajit/eolian.lua5
-rw-r--r--src/lib/eolian/Eolian.h10
-rw-r--r--src/lib/eolian/database_function_api.c7
-rw-r--r--src/lib/eolian/eo_lexer.h2
-rw-r--r--src/lib/eolian/eo_parser.c41
-rw-r--r--src/lib/eolian/eolian_database.h1
-rw-r--r--src/scripts/elua/apps/docgen/doctree.lua4
-rw-r--r--src/scripts/elua/apps/gendoc.lua3
-rw-r--r--src/scripts/elua/modules/lualian.lua4
-rw-r--r--src/tests/eolian/data/class_simple.eo4
-rw-r--r--src/tests/eolian/eolian_parsing.c2
11 files changed, 13 insertions, 70 deletions
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index d31ead5c45..660667bec6 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -259,7 +259,6 @@ ffi.cdef [[
const Eolian_Implement *eolian_function_implement_get(const Eolian_Function *function_id);
Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id, Eolian_Function_Type ftype);
Eina_Bool eolian_function_is_class(const Eolian_Function *function_id);
- Eina_Bool eolian_function_is_c_only(const Eolian_Function *function_id);
Eina_Iterator *eolian_property_keys_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype);
Eina_Iterator *eolian_property_values_get(const Eolian_Function *foo_id, Eolian_Function_Type ftype);
Eina_Iterator *eolian_function_parameters_get(const Eolian_Function *function_id);
@@ -806,10 +805,6 @@ M.Function = ffi.metatype("Eolian_Function", {
return eolian.eolian_function_is_class(self) ~= 0
end,
- is_c_only = function(self)
- return eolian.eolian_function_is_c_only(self) ~= 0
- end,
-
property_keys_get = function(self, ftype)
return Ptr_Iterator("const Eolian_Function_Parameter*",
eolian.eolian_property_keys_get(self, ftype))
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 9f99d361f1..2bface281f 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -799,16 +799,6 @@ EAPI Eina_Bool eolian_function_is_legacy_only(const Eolian_Function *function_id
EAPI Eina_Bool eolian_function_is_class(const Eolian_Function *function_id);
/*
- * @brief Get whether a function is C only (i.e. not bindable).
- *
- * @param[in] function_id Id of the function
- * @return EINA_TRUE and EINA_FALSE respectively
- *
- * @ingroup Eolian
- */
-EAPI Eina_Bool eolian_function_is_c_only(const Eolian_Function *function_id);
-
-/*
* @brief Get whether a function is beta.
*
* @param[in] function_id Id of the function
diff --git a/src/lib/eolian/database_function_api.c b/src/lib/eolian/database_function_api.c
index a3a00d5380..400bd1dffb 100644
--- a/src/lib/eolian/database_function_api.c
+++ b/src/lib/eolian/database_function_api.c
@@ -402,13 +402,6 @@ eolian_function_class_get(const Eolian_Function *fid)
}
EAPI Eina_Bool
-eolian_function_is_c_only(const Eolian_Function *fid)
-{
- EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
- return fid->is_c_only;
-}
-
-EAPI Eina_Bool
eolian_function_is_beta(const Eolian_Function *fid)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(fid, EINA_FALSE);
diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index 9c9b1d25c1..9a82bca2ed 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -29,7 +29,7 @@ enum Tokens
KW(get), KW(implements), KW(import), KW(interface), KW(keys), KW(legacy), \
KW(legacy_prefix), KW(methods), KW(mixin), KW(own), KW(params), KW(ptr), \
KW(set), KW(type), KW(values), KW(var), KWAT(auto), KWAT(beta), \
- KWAT(c_only), KWAT(class), KWAT(const), KWAT(empty), KWAT(extern), \
+ KWAT(class), KWAT(const), KWAT(empty), KWAT(extern), \
KWAT(free), KWAT(hot), KWAT(in), KWAT(inout), KWAT(nonull), KWAT(nullable), \
KWAT(optional), KWAT(out), KWAT(private), KWAT(property), \
KWAT(protected), KWAT(restart), KWAT(pure_virtual), KWAT(warn_unused), \
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 24585977c0..8e035f672f 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -1290,8 +1290,7 @@ parse_property(Eo_Lexer *ls)
Eina_Bool has_get = EINA_FALSE, has_set = EINA_FALSE,
has_keys = EINA_FALSE, has_values = EINA_FALSE,
has_protected = EINA_FALSE, has_class = EINA_FALSE,
- has_c_only = EINA_FALSE, has_beta = EINA_FALSE,
- has_virtp = EINA_FALSE;
+ has_beta = EINA_FALSE, has_virtp = EINA_FALSE;
prop = calloc(1, sizeof(Eolian_Function));
prop->klass = ls->tmp.kls;
prop->type = EOLIAN_UNRESOLVED;
@@ -1325,11 +1324,6 @@ parse_property(Eo_Lexer *ls)
prop->is_class = EINA_TRUE;
eo_lexer_get(ls);
break;
- case KW_at_c_only:
- CASE_LOCK(ls, c_only, "c_only qualifier");
- prop->is_c_only = EINA_TRUE;
- eo_lexer_get(ls);
- break;
case KW_at_beta:
CASE_LOCK(ls, beta, "beta qualifier");
prop->is_beta = EINA_TRUE;
@@ -1391,9 +1385,7 @@ parse_function_pointer(Eo_Lexer *ls)
Eolian_Function *meth = NULL;
Eina_Bool has_params = EINA_FALSE,
- has_return = EINA_FALSE,
- has_c_only = EINA_FALSE,
- has_beta = EINA_FALSE;
+ has_return = EINA_FALSE;
eo_lexer_get(ls);
@@ -1416,22 +1408,10 @@ parse_function_pointer(Eo_Lexer *ls)
def->function_pointer = meth;
- for (;;) switch (ls->t.kw)
- {
- case KW_at_c_only:
- CASE_LOCK(ls, c_only, "c_only qualifier");
- meth->is_c_only = EINA_TRUE;
- eo_lexer_get(ls);
- break;
- case KW_at_beta:
- CASE_LOCK(ls, beta, "beta qualifier");
- meth->is_beta = EINA_TRUE;
- eo_lexer_get(ls);
- break;
- default:
- goto body;
- }
-body:
+ meth->is_beta = (ls->t.kw == KW_at_beta);
+ if (meth->is_beta)
+ eo_lexer_get(ls);
+
bline = ls->line_number;
bcol = ls->column;
check_next(ls, '{');
@@ -1472,8 +1452,8 @@ parse_method(Eo_Lexer *ls)
Eina_Bool has_const = EINA_FALSE, has_params = EINA_FALSE,
has_return = EINA_FALSE, has_legacy = EINA_FALSE,
has_protected = EINA_FALSE, has_class = EINA_FALSE,
- has_eo = EINA_FALSE, has_c_only = EINA_FALSE,
- has_beta = EINA_FALSE, has_virtp = EINA_FALSE;
+ has_eo = EINA_FALSE, has_beta = EINA_FALSE,
+ has_virtp = EINA_FALSE;
meth = calloc(1, sizeof(Eolian_Function));
meth->klass = ls->tmp.kls;
meth->type = EOLIAN_METHOD;
@@ -1512,11 +1492,6 @@ parse_method(Eo_Lexer *ls)
meth->is_class = EINA_TRUE;
eo_lexer_get(ls);
break;
- case KW_at_c_only:
- CASE_LOCK(ls, c_only, "c_only qualifier");
- meth->is_c_only = EINA_TRUE;
- eo_lexer_get(ls);
- break;
case KW_at_beta:
CASE_LOCK(ls, beta, "beta qualifier");
meth->is_beta = EINA_TRUE;
diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h
index bb7f5ba348..03c9c109ff 100644
--- a/src/lib/eolian/eolian_database.h
+++ b/src/lib/eolian/eolian_database.h
@@ -134,7 +134,6 @@ struct _Eolian_Function
Eina_Bool get_only_legacy: 1;
Eina_Bool set_only_legacy: 1;
Eina_Bool is_class :1;
- Eina_Bool is_c_only :1;
Eina_Bool is_beta :1;
Eina_List *ctor_of;
Eolian_Class *klass;
diff --git a/src/scripts/elua/apps/docgen/doctree.lua b/src/scripts/elua/apps/docgen/doctree.lua
index 2f77dbcc55..9130f3ca46 100644
--- a/src/scripts/elua/apps/docgen/doctree.lua
+++ b/src/scripts/elua/apps/docgen/doctree.lua
@@ -391,10 +391,6 @@ M.Function = Node:clone {
return self.func:is_class()
end,
- is_c_only = function(self)
- return self.func:is_c_only()
- end,
-
property_keys_get = function(self, ft)
local ret = {}
for par in self.func:property_keys_get(ft) do
diff --git a/src/scripts/elua/apps/gendoc.lua b/src/scripts/elua/apps/gendoc.lua
index 15a001d238..77e9df0757 100644
--- a/src/scripts/elua/apps/gendoc.lua
+++ b/src/scripts/elua/apps/gendoc.lua
@@ -116,9 +116,6 @@ local gen_func_namesig = function(fn, cl, buf, isprop, isget, isset)
if fn:is_const() then
buf[#buf + 1] = "@const "
end
- if fn:is_c_only() then
- buf[#buf + 1] = "@c_only "
- end
end
local gen_func_param = function(fp, buf, nodir)
diff --git a/src/scripts/elua/modules/lualian.lua b/src/scripts/elua/modules/lualian.lua
index fd6072e4d4..a88e3d0d9a 100644
--- a/src/scripts/elua/modules/lualian.lua
+++ b/src/scripts/elua/modules/lualian.lua
@@ -630,7 +630,7 @@ local gen_contents = function(klass)
for i, v in ipairs(props) do
local gscope = v:scope_get(func_type.PROP_GET)
local sscope = v:scope_get(func_type.PROP_SET)
- if (gscope == obj_scope.PUBLIC or sscope == obj_scope.PUBLIC) and not v:is_c_only() then
+ if (gscope == obj_scope.PUBLIC or sscope == obj_scope.PUBLIC) then
local ftype = v:type_get()
local fread = (ftype == func_type.PROPERTY or ftype == func_type.PROP_GET)
local fwrite = (ftype == func_type.PROPERTY or ftype == func_type.PROP_SET)
@@ -645,7 +645,7 @@ local gen_contents = function(klass)
-- then methods
local meths = klass:functions_get(func_type.METHOD):to_array()
for i, v in ipairs(meths) do
- if v:scope_get(func_type.METHOD) == obj_scope.PUBLIC and not v:is_c_only() then
+ if v:scope_get(func_type.METHOD) == obj_scope.PUBLIC then
cnt[#cnt + 1] = Method(v)
end
end
diff --git a/src/tests/eolian/data/class_simple.eo b/src/tests/eolian/data/class_simple.eo
index c08ec9fa2d..6d9e59ddd7 100644
--- a/src/tests/eolian/data/class_simple.eo
+++ b/src/tests/eolian/data/class_simple.eo
@@ -24,7 +24,7 @@ class Class_Simple {
value: int (100); [[Value description]]
}
}
- @property b @c_only {
+ @property b {
set {
eo: null;
}
@@ -39,7 +39,7 @@ class Class_Simple {
}
return: ptr(char) (null); [[comment for method return]]
}
- bar @c_only {
+ bar {
eo: null;
params {
x: int;
diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c
index fcb5f7443d..0b55cf19b1 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -582,7 +582,6 @@ START_TEST(eolian_simple_parsing)
fail_if(!(fid = eolian_class_function_get_by_name(class, "b", EOLIAN_PROP_SET)));
fail_if(eolian_function_is_legacy_only(fid, EOLIAN_PROP_GET));
fail_if(!eolian_function_is_legacy_only(fid, EOLIAN_PROP_SET));
- fail_if(!eolian_function_is_c_only(fid));
fail_if(eolian_function_is_beta(fid));
/* Method */
@@ -633,7 +632,6 @@ START_TEST(eolian_simple_parsing)
/* legacy only + c only */
fail_if(!(fid = eolian_class_function_get_by_name(class, "bar", EOLIAN_METHOD)));
fail_if(!eolian_function_is_legacy_only(fid, EOLIAN_METHOD));
- fail_if(!eolian_function_is_c_only(fid));
fail_if(eolian_function_is_beta(fid));
fail_if(!eolian_type_is_ptr(eolian_function_return_type_get(fid, EOLIAN_METHOD)));