2014-09-23 12:48:16 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2014-07-10 04:15:29 -07:00
|
|
|
#include <Eina.h>
|
|
|
|
#include "eolian_database.h"
|
|
|
|
|
|
|
|
void
|
2014-07-10 06:30:34 -07:00
|
|
|
database_class_del(Eolian_Class *cl)
|
2014-07-10 04:15:29 -07:00
|
|
|
{
|
|
|
|
Eolian_Function *fid;
|
|
|
|
Eolian_Event *ev;
|
2017-10-31 04:14:51 -07:00
|
|
|
Eolian_Part *pt;
|
2014-09-11 02:50:48 -07:00
|
|
|
Eolian_Implement *impl;
|
|
|
|
Eolian_Constructor *ctor;
|
2014-07-10 04:15:29 -07:00
|
|
|
|
2018-02-21 07:36:08 -08:00
|
|
|
if (!cl || eolian_object_unref(&cl->base)) return;
|
2014-09-11 03:27:35 -07:00
|
|
|
|
2018-03-08 10:30:40 -08:00
|
|
|
eina_stringshare_del(cl->base.file);
|
|
|
|
eina_stringshare_del(cl->base.name);
|
2019-05-16 06:31:37 -07:00
|
|
|
eina_stringshare_del(cl->base.c_name);
|
2014-08-07 07:15:07 -07:00
|
|
|
|
2014-09-11 02:50:48 -07:00
|
|
|
EINA_LIST_FREE(cl->implements, impl)
|
|
|
|
database_implement_del(impl);
|
2014-07-10 04:15:29 -07:00
|
|
|
|
2014-09-11 02:50:48 -07:00
|
|
|
EINA_LIST_FREE(cl->constructors, ctor)
|
|
|
|
database_constructor_del(ctor);
|
2014-09-01 07:35:50 -07:00
|
|
|
|
2014-07-10 06:30:34 -07:00
|
|
|
EINA_LIST_FREE(cl->methods, fid) database_function_del(fid);
|
|
|
|
EINA_LIST_FREE(cl->properties, fid) database_function_del(fid);
|
|
|
|
EINA_LIST_FREE(cl->events, ev) database_event_del(ev);
|
2017-10-31 04:14:51 -07:00
|
|
|
EINA_LIST_FREE(cl->parts, pt) database_part_del(pt);
|
2019-01-16 10:39:39 -08:00
|
|
|
eina_list_free(cl->requires);
|
|
|
|
eina_list_free(cl->callables);
|
2019-01-18 08:24:12 -08:00
|
|
|
eina_list_free(cl->composite);
|
2014-07-10 04:15:29 -07:00
|
|
|
|
2019-05-09 07:16:42 -07:00
|
|
|
if (cl->c_prefix) eina_stringshare_del(cl->c_prefix);
|
2016-05-17 09:14:47 -07:00
|
|
|
if (cl->ev_prefix) eina_stringshare_del(cl->ev_prefix);
|
2014-09-11 02:50:48 -07:00
|
|
|
if (cl->data_type) eina_stringshare_del(cl->data_type);
|
2014-07-10 04:15:29 -07:00
|
|
|
|
2015-06-03 07:35:13 -07:00
|
|
|
database_doc_del(cl->doc);
|
|
|
|
|
2014-07-10 06:30:34 -07:00
|
|
|
free(cl);
|
2014-07-10 04:15:29 -07:00
|
|
|
}
|