forked from enlightenment/efl
eolian_gen: utilize c_name instead of name for generation
This will make generated output properly respect the @c_name tags.
This commit is contained in:
parent
d3159a31d7
commit
a7d5b089da
|
@ -462,7 +462,7 @@ eo_gen_docs_func_gen(const Eolian_State *state, const Eolian_Function *fid,
|
|||
|
||||
int curl = 0;
|
||||
|
||||
const char *group = eolian_class_name_get(eolian_function_class_get(fid));
|
||||
const char *group = eolian_class_c_name_get(eolian_function_class_get(fid));
|
||||
const Eolian_Implement *fimp = eolian_function_implement_get(fid);
|
||||
|
||||
if (ftype == EOLIAN_METHOD)
|
||||
|
|
|
@ -211,7 +211,7 @@ eo_gen_header_gen(const Eolian_State *state, const Eolian_Class *cl,
|
|||
if (doc)
|
||||
{
|
||||
Eina_Strbuf *cdoc = eo_gen_docs_full_gen(state, doc,
|
||||
eolian_class_name_get(cl), 0);
|
||||
eolian_class_c_name_get(cl), 0);
|
||||
if (cdoc)
|
||||
{
|
||||
eina_strbuf_append(buf, eina_strbuf_string_get(cdoc));
|
||||
|
@ -287,7 +287,7 @@ events:
|
|||
"Efl_Event_Description _%s;\n\n", evn);
|
||||
|
||||
Eina_Strbuf *evdbuf = eo_gen_docs_event_gen(state, ev,
|
||||
eolian_class_name_get(cl));
|
||||
eolian_class_c_name_get(cl));
|
||||
eina_strbuf_append(buf, eina_strbuf_string_get(evdbuf));
|
||||
eina_strbuf_append_char(buf, '\n');
|
||||
eina_strbuf_free(evdbuf);
|
||||
|
|
|
@ -288,7 +288,7 @@ void eo_gen_class_names_get(const Eolian_Class *cl, char **cname,
|
|||
char **cnameu, char **cnamel)
|
||||
{
|
||||
char *cn = NULL, *cnu = NULL, *cnl = NULL;
|
||||
cn = eo_gen_c_full_name_get(eolian_class_name_get(cl));
|
||||
cn = eo_gen_c_full_name_get(eolian_class_c_name_get(cl));
|
||||
if (!cn)
|
||||
abort();
|
||||
if (cname)
|
||||
|
|
|
@ -8,7 +8,7 @@ static Eina_Strbuf *
|
|||
_type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
|
||||
Eina_Bool full)
|
||||
{
|
||||
char *grp = strdup(eolian_typedecl_name_get(tp));
|
||||
char *grp = strdup(eolian_typedecl_c_name_get(tp));
|
||||
char *p = strrchr(grp, '.');
|
||||
if (p) *p = '\0';
|
||||
Eina_Strbuf *buf = eo_gen_docs_full_gen(state, eolian_typedecl_documentation_get(tp),
|
||||
|
@ -30,7 +30,7 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
|
|||
case EOLIAN_TYPEDECL_STRUCT_OPAQUE:
|
||||
{
|
||||
const Eolian_Struct_Type_Field *memb;
|
||||
char *fn = eo_gen_c_full_name_get(eolian_typedecl_name_get(tp));
|
||||
char *fn = eo_gen_c_full_name_get(eolian_typedecl_c_name_get(tp));
|
||||
if (tpt == EOLIAN_TYPEDECL_STRUCT_OPAQUE || !full)
|
||||
{
|
||||
eina_strbuf_append_printf(buf, "typedef struct _%s %s", fn, fn);
|
||||
|
@ -119,7 +119,7 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
|
|||
eina_strbuf_append(buf, "\n");
|
||||
}
|
||||
eina_iterator_free(membs);
|
||||
char *fn = eo_gen_c_full_name_get(eolian_typedecl_name_get(tp));
|
||||
char *fn = eo_gen_c_full_name_get(eolian_typedecl_c_name_get(tp));
|
||||
eina_strbuf_append_printf(buf, "} %s", fn);
|
||||
free(fn);
|
||||
break;
|
||||
|
@ -142,7 +142,7 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
|
|||
}
|
||||
|
||||
/* Function name */
|
||||
char *fn = eo_gen_c_full_name_get(eolian_typedecl_name_get(tp));
|
||||
char *fn = eo_gen_c_full_name_get(eolian_typedecl_c_name_get(tp));
|
||||
eina_strbuf_append_printf(buf, "(*%s)", fn);
|
||||
free(fn);
|
||||
|
||||
|
@ -170,7 +170,7 @@ _type_generate(const Eolian_State *state, const Eolian_Typedecl *tp,
|
|||
static Eina_Strbuf *
|
||||
_const_generate(const Eolian_State *state, const Eolian_Constant *vr)
|
||||
{
|
||||
char *fn = strdup(eolian_constant_name_get(vr));
|
||||
char *fn = strdup(eolian_constant_c_name_get(vr));
|
||||
char *p = strrchr(fn, '.');
|
||||
if (p) *p = '\0';
|
||||
Eina_Strbuf *buf = eo_gen_docs_full_gen(state, eolian_constant_documentation_get(vr),
|
||||
|
@ -211,7 +211,7 @@ _const_generate(const Eolian_State *state, const Eolian_Constant *vr)
|
|||
static Eina_Strbuf *
|
||||
_err_generate(const Eolian_State *state, const Eolian_Error *err)
|
||||
{
|
||||
char *fn = strdup(eolian_error_name_get(err));
|
||||
char *fn = strdup(eolian_error_c_name_get(err));
|
||||
char *p = strrchr(fn, '.');
|
||||
if (p) *p = '\0';
|
||||
Eina_Strbuf *buf = eo_gen_docs_full_gen(state, eolian_error_documentation_get(err),
|
||||
|
@ -319,7 +319,7 @@ _source_gen_error(Eina_Strbuf *buf, const Eolian_Error *err)
|
|||
if (eolian_error_is_extern(err))
|
||||
return;
|
||||
|
||||
char *fn = strdup(eolian_error_name_get(err));
|
||||
char *fn = strdup(eolian_error_c_name_get(err));
|
||||
for (char *p = strchr(fn, '.'); p; p = strchr(p, '.'))
|
||||
*p = '_';
|
||||
eina_str_tolower(&fn);
|
||||
|
@ -385,7 +385,7 @@ Eina_Strbuf *eo_gen_class_typedef_gen(const Eolian_State *eos, const char *eof)
|
|||
const Eolian_Class *cl = eolian_state_class_by_file_get(eos, eof);
|
||||
if (!cl)
|
||||
return NULL;
|
||||
char *clfn = eo_gen_c_full_name_get(eolian_class_name_get(cl));
|
||||
char *clfn = eo_gen_c_full_name_get(eolian_class_c_name_get(cl));
|
||||
if (!clfn)
|
||||
return NULL;
|
||||
Eina_Strbuf *ret = eina_strbuf_new();
|
||||
|
|
Loading…
Reference in New Issue