eolian: loosen the requirements on API (don't return stringshare)

This commit is contained in:
Daniel Kolesa 2019-09-26 16:41:31 +02:00
parent 6d93dc4cbf
commit cdff7852e0
4 changed files with 16 additions and 16 deletions

View File

@ -1507,7 +1507,7 @@ EAPI const Eolian_Documentation *eolian_class_documentation_get(const Eolian_Cla
*
* @ingroup Eolian
*/
EAPI Eina_Stringshare* eolian_class_c_prefix_get(const Eolian_Class *klass);
EAPI const char *eolian_class_c_prefix_get(const Eolian_Class *klass);
/*
* @brief Returns the C event prefix of a class
@ -1517,7 +1517,7 @@ EAPI Eina_Stringshare* eolian_class_c_prefix_get(const Eolian_Class *klass);
*
* @ingroup Eolian
*/
EAPI Eina_Stringshare* eolian_class_event_c_prefix_get(const Eolian_Class *klass);
EAPI const char *eolian_class_event_c_prefix_get(const Eolian_Class *klass);
/*
* @brief Returns the data type of a class
@ -1527,7 +1527,7 @@ EAPI Eina_Stringshare* eolian_class_event_c_prefix_get(const Eolian_Class *klass
*
* @ingroup Eolian
*/
EAPI Eina_Stringshare *eolian_class_data_type_get(const Eolian_Class *klass);
EAPI const char *eolian_class_data_type_get(const Eolian_Class *klass);
/*
* @brief Get the parent class of a class
@ -2735,7 +2735,7 @@ eolian_typedecl_namespaces_get(const Eolian_Typedecl *tp)
*
* @ingroup Eolian
*/
EAPI Eina_Stringshare *eolian_typedecl_free_func_get(const Eolian_Typedecl *tp);
EAPI const char *eolian_typedecl_free_func_get(const Eolian_Typedecl *tp);
/*
* @brief Get the function object for this function pointer type.
@ -3284,7 +3284,7 @@ EAPI Eina_Bool eolian_error_is_extern(const Eolian_Error *err);
*
* @ingroup Eolian
*/
EAPI Eina_Stringshare *eolian_documentation_summary_get(const Eolian_Documentation *doc);
EAPI const char *eolian_documentation_summary_get(const Eolian_Documentation *doc);
/*
* @brief Get the description of the documentation.
@ -3297,7 +3297,7 @@ EAPI Eina_Stringshare *eolian_documentation_summary_get(const Eolian_Documentati
*
* @ingroup Eolian
*/
EAPI Eina_Stringshare *eolian_documentation_description_get(const Eolian_Documentation *doc);
EAPI const char *eolian_documentation_description_get(const Eolian_Documentation *doc);
/*
* @brief Get the "since" tag of the documentation.
@ -3310,7 +3310,7 @@ EAPI Eina_Stringshare *eolian_documentation_description_get(const Eolian_Documen
*
* @ingroup Eolian
*/
EAPI Eina_Stringshare *eolian_documentation_since_get(const Eolian_Documentation *doc);
EAPI const char *eolian_documentation_since_get(const Eolian_Documentation *doc);
/*
* @brief Split a documentation string into individual paragraphs.
@ -3409,7 +3409,7 @@ EAPI Eolian_Object_Type eolian_doc_token_ref_resolve(const Eolian_Doc_Token *tok
*
* @ingroup Eolian
*/
EAPI Eina_Stringshare *eolian_typedecl_enum_legacy_prefix_get(const Eolian_Typedecl *tp);
EAPI const char *eolian_typedecl_enum_legacy_prefix_get(const Eolian_Typedecl *tp);
/*
* @brief Get whether the given type is a reference.

View File

@ -20,21 +20,21 @@ eolian_class_documentation_get(const Eolian_Class *cl)
return cl->doc;
}
EAPI Eina_Stringshare*
EAPI const char *
eolian_class_c_prefix_get(const Eolian_Class *cl)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL);
return cl->c_prefix;
}
EAPI Eina_Stringshare*
EAPI const char *
eolian_class_event_c_prefix_get(const Eolian_Class *cl)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL);
return cl->ev_prefix;
}
EAPI Eina_Stringshare*
EAPI const char *
eolian_class_data_type_get(const Eolian_Class *cl)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(cl, NULL);

View File

@ -148,7 +148,7 @@ eolian_typedecl_enum_field_value_get(const Eolian_Enum_Type_Field *fl, Eina_Bool
return fl->value;
}
EAPI Eina_Stringshare *
EAPI const char *
eolian_typedecl_enum_legacy_prefix_get(const Eolian_Typedecl *tp)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
@ -285,7 +285,7 @@ eolian_typedecl_c_type_get(const Eolian_Typedecl *tp)
return ret;
}
EAPI Eina_Stringshare *
EAPI const char *
eolian_typedecl_free_func_get(const Eolian_Typedecl *tp)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);

View File

@ -143,21 +143,21 @@ void database_doc_del(Eolian_Documentation *doc)
free(doc);
}
EAPI Eina_Stringshare *
EAPI const char *
eolian_documentation_summary_get(const Eolian_Documentation *doc)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(doc, NULL);
return doc->summary;
}
EAPI Eina_Stringshare *
EAPI const char *
eolian_documentation_description_get(const Eolian_Documentation *doc)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(doc, NULL);
return doc->description;
}
EAPI Eina_Stringshare *
EAPI const char *
eolian_documentation_since_get(const Eolian_Documentation *doc)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(doc, NULL);