summaryrefslogtreecommitdiff
path: root/src/lib/eolian
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/lib/eolian
parent4406d7098cb37dc8597589c1254adf8f3b3197a4 (diff)
downloadefl-10fd3c32e825842c837fbfb68094ef7f2e4ae9e5.tar.gz
eolian: remove c_only
Unused and of questionable value.
Diffstat (limited to 'src/lib/eolian')
-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
5 files changed, 9 insertions, 52 deletions
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;