summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/eolian/Eolian.h26
-rw-r--r--src/lib/eolian/database_validate.c2
-rw-r--r--src/lib/eolian/eo_lexer.c4
-rw-r--r--src/lib/eolian/eo_lexer.h4
-rw-r--r--src/lib/eolian/eolian_database.c34
-rw-r--r--src/lib/eolian/eolian_database.h8
-rw-r--r--src/lib/eolian_cxx/Eolian_Cxx.hh6
7 files changed, 42 insertions, 42 deletions
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index bb67db9139..46c864cb95 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -88,7 +88,7 @@ extern "C" {
88 * 88 *
89 * @ingroup Eolian 89 * @ingroup Eolian
90 */ 90 */
91typedef struct _Eolian Eolian; 91typedef struct _Eolian_State Eolian_State;
92 92
93/* Class type used to extract information on classes 93/* Class type used to extract information on classes
94 * 94 *
@@ -482,7 +482,7 @@ EAPI int eolian_shutdown(void);
482 * 482 *
483 * @ingroup Eolian 483 * @ingroup Eolian
484 */ 484 */
485EAPI Eolian *eolian_new(void); 485EAPI Eolian_State *eolian_state_new(void);
486 486
487/* 487/*
488 * @brief Free an Eolian state. 488 * @brief Free an Eolian state.
@@ -494,7 +494,7 @@ EAPI Eolian *eolian_new(void);
494 * @param[in] state the state to free 494 * @param[in] state the state to free
495 * 495 *
496 */ 496 */
497EAPI void eolian_free(Eolian *state); 497EAPI void eolian_state_free(Eolian_State *state);
498 498
499/* 499/*
500 * @brief Parse the given .eo or .eot file and fill the database. 500 * @brief Parse the given .eo or .eot file and fill the database.
@@ -510,7 +510,7 @@ EAPI void eolian_free(Eolian *state);
510 * 510 *
511 * @ingroup Eolian 511 * @ingroup Eolian
512 */ 512 */
513EAPI const Eolian_Unit *eolian_file_parse(Eolian *state, const char *filepath); 513EAPI const Eolian_Unit *eolian_file_parse(Eolian_State *state, const char *filepath);
514 514
515/* 515/*
516 * @brief Get an iterator to all .eo file names with paths. 516 * @brief Get an iterator to all .eo file names with paths.
@@ -523,7 +523,7 @@ EAPI const Eolian_Unit *eolian_file_parse(Eolian *state, const char *filepath);
523 * 523 *
524 * @ingroup Eolian 524 * @ingroup Eolian
525 */ 525 */
526EAPI Eina_Iterator *eolian_all_eo_file_paths_get(const Eolian *state); 526EAPI Eina_Iterator *eolian_all_eo_file_paths_get(const Eolian_State *state);
527 527
528/* 528/*
529 * @brief Get an iterator to all .eot file names with paths. 529 * @brief Get an iterator to all .eot file names with paths.
@@ -536,7 +536,7 @@ EAPI Eina_Iterator *eolian_all_eo_file_paths_get(const Eolian *state);
536 * 536 *
537 * @ingroup Eolian 537 * @ingroup Eolian
538 */ 538 */
539EAPI Eina_Iterator *eolian_all_eot_file_paths_get(const Eolian *state); 539EAPI Eina_Iterator *eolian_all_eot_file_paths_get(const Eolian_State *state);
540 540
541/* 541/*
542 * @brief Get an iterator to all .eo file names (without paths). 542 * @brief Get an iterator to all .eo file names (without paths).
@@ -549,7 +549,7 @@ EAPI Eina_Iterator *eolian_all_eot_file_paths_get(const Eolian *state);
549 * 549 *
550 * @ingroup Eolian 550 * @ingroup Eolian
551 */ 551 */
552EAPI Eina_Iterator *eolian_all_eo_files_get(const Eolian *state); 552EAPI Eina_Iterator *eolian_all_eo_files_get(const Eolian_State *state);
553 553
554/* 554/*
555 * @brief Get an iterator to all .eot file names (without paths). 555 * @brief Get an iterator to all .eot file names (without paths).
@@ -562,7 +562,7 @@ EAPI Eina_Iterator *eolian_all_eo_files_get(const Eolian *state);
562 * 562 *
563 * @ingroup Eolian 563 * @ingroup Eolian
564 */ 564 */
565EAPI Eina_Iterator *eolian_all_eot_files_get(const Eolian *state); 565EAPI Eina_Iterator *eolian_all_eot_files_get(const Eolian_State *state);
566 566
567/* 567/*
568 * @brief Scan the given directory (recursively) and search for .eo and 568 * @brief Scan the given directory (recursively) and search for .eo and
@@ -578,7 +578,7 @@ EAPI Eina_Iterator *eolian_all_eot_files_get(const Eolian *state);
578 * 578 *
579 * @ingroup Eolian 579 * @ingroup Eolian
580 */ 580 */
581EAPI Eina_Bool eolian_directory_scan(Eolian *state, const char *dir); 581EAPI Eina_Bool eolian_directory_scan(Eolian_State *state, const char *dir);
582 582
583/* 583/*
584 * @brief Scan the system directory (recursively) and search for .eo and 584 * @brief Scan the system directory (recursively) and search for .eo and
@@ -592,7 +592,7 @@ EAPI Eina_Bool eolian_directory_scan(Eolian *state, const char *dir);
592 * 592 *
593 * @ingroup Eolian 593 * @ingroup Eolian
594 */ 594 */
595EAPI Eina_Bool eolian_system_directory_scan(Eolian *state); 595EAPI Eina_Bool eolian_system_directory_scan(Eolian_State *state);
596 596
597/* 597/*
598 * @brief Force parsing of all the .eo files located in the directories 598 * @brief Force parsing of all the .eo files located in the directories
@@ -607,7 +607,7 @@ EAPI Eina_Bool eolian_system_directory_scan(Eolian *state);
607 * 607 *
608 * @ingroup Eolian 608 * @ingroup Eolian
609 */ 609 */
610EAPI Eina_Bool eolian_all_eo_files_parse(Eolian *state); 610EAPI Eina_Bool eolian_all_eo_files_parse(Eolian_State *state);
611 611
612/* 612/*
613 * @brief Force parsing of all the .eot files located in the directories 613 * @brief Force parsing of all the .eot files located in the directories
@@ -622,7 +622,7 @@ EAPI Eina_Bool eolian_all_eo_files_parse(Eolian *state);
622 * 622 *
623 * @ingroup Eolian 623 * @ingroup Eolian
624 */ 624 */
625EAPI Eina_Bool eolian_all_eot_files_parse(Eolian *state); 625EAPI Eina_Bool eolian_all_eot_files_parse(Eolian_State *state);
626 626
627/* 627/*
628 * @brief Gets a class by its name 628 * @brief Gets a class by its name
@@ -2416,7 +2416,7 @@ EAPI const Eolian_Declaration *eolian_declaration_get_by_name(const Eolian_Unit
2416 * 2416 *
2417 * @ingroup Eolian 2417 * @ingroup Eolian
2418 */ 2418 */
2419EAPI Eina_Iterator *eolian_declarations_get_by_file(const Eolian *state, const char *fname); 2419EAPI Eina_Iterator *eolian_declarations_get_by_file(const Eolian_State *state, const char *fname);
2420 2420
2421/* 2421/*
2422 * @brief Get an iterator to all declarations in the Eolian database. 2422 * @brief Get an iterator to all declarations in the Eolian database.
diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c
index 238eabbe9a..bbdf1d501d 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -845,7 +845,7 @@ _var_map_cb(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNUSED,
845} 845}
846 846
847Eina_Bool 847Eina_Bool
848database_validate(Eolian *state, const Eolian_Unit *src) 848database_validate(Eolian_State *state, const Eolian_Unit *src)
849{ 849{
850 Eolian_Class *cl; 850 Eolian_Class *cl;
851 851
diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c
index 80f08eac2c..70c3afdf2b 100644
--- a/src/lib/eolian/eo_lexer.c
+++ b/src/lib/eolian/eo_lexer.c
@@ -1014,7 +1014,7 @@ get_filename(Eo_Lexer *ls)
1014} 1014}
1015 1015
1016static void 1016static void
1017eo_lexer_set_input(Eo_Lexer *ls, Eolian *state, const char *source) 1017eo_lexer_set_input(Eo_Lexer *ls, Eolian_State *state, const char *source)
1018{ 1018{
1019 Eina_File *f = eina_file_open(source, EINA_FALSE); 1019 Eina_File *f = eina_file_open(source, EINA_FALSE);
1020 if (!f) 1020 if (!f)
@@ -1115,7 +1115,7 @@ eo_lexer_free(Eo_Lexer *ls)
1115} 1115}
1116 1116
1117Eo_Lexer * 1117Eo_Lexer *
1118eo_lexer_new(Eolian *state, const char *source) 1118eo_lexer_new(Eolian_State *state, const char *source)
1119{ 1119{
1120 volatile Eo_Lexer *ls = calloc(1, sizeof(Eo_Lexer)); 1120 volatile Eo_Lexer *ls = calloc(1, sizeof(Eo_Lexer));
1121 1121
diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index 9ca577101b..c944cd6ce1 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -167,7 +167,7 @@ typedef struct _Eo_Lexer
167 * display the current line with a caret at the respective column */ 167 * display the current line with a caret at the respective column */
168 const char *stream_line; 168 const char *stream_line;
169 /* a pointer to the state this lexer belongs to */ 169 /* a pointer to the state this lexer belongs to */
170 Eolian *state; 170 Eolian_State *state;
171 /* the unit being filled during current parsing */ 171 /* the unit being filled during current parsing */
172 Eolian_Unit *unit; 172 Eolian_Unit *unit;
173 /* this is jumped to when an error happens */ 173 /* this is jumped to when an error happens */
@@ -191,7 +191,7 @@ typedef struct _Eo_Lexer
191 191
192int eo_lexer_init (void); 192int eo_lexer_init (void);
193int eo_lexer_shutdown (void); 193int eo_lexer_shutdown (void);
194Eo_Lexer *eo_lexer_new (Eolian *state, const char *source); 194Eo_Lexer *eo_lexer_new (Eolian_State *state, const char *source);
195void eo_lexer_free (Eo_Lexer *ls); 195void eo_lexer_free (Eo_Lexer *ls);
196/* gets a regular token, singlechar or one of TOK_something */ 196/* gets a regular token, singlechar or one of TOK_something */
197int eo_lexer_get (Eo_Lexer *ls); 197int eo_lexer_get (Eo_Lexer *ls);
diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c
index da5cc8766b..70a6dc3818 100644
--- a/src/lib/eolian/eolian_database.c
+++ b/src/lib/eolian/eolian_database.c
@@ -44,7 +44,7 @@ eolian_declaration_get_by_name(const Eolian_Unit *unit, const char *name)
44} 44}
45 45
46EAPI Eina_Iterator * 46EAPI Eina_Iterator *
47eolian_declarations_get_by_file(const Eolian *state, const char *fname) 47eolian_declarations_get_by_file(const Eolian_State *state, const char *fname)
48{ 48{
49 if (!state) return NULL; 49 if (!state) return NULL;
50 Eina_Stringshare *shr = eina_stringshare_add(fname); 50 Eina_Stringshare *shr = eina_stringshare_add(fname);
@@ -514,7 +514,7 @@ eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok,
514} 514}
515 515
516void 516void
517database_unit_init(Eolian *state, Eolian_Unit *unit) 517database_unit_init(Eolian_State *state, Eolian_Unit *unit)
518{ 518{
519 unit->state = state; 519 unit->state = state;
520 520
@@ -549,10 +549,10 @@ _hashlist_free(void *data)
549 eina_list_free((Eina_List*)data); 549 eina_list_free((Eina_List*)data);
550} 550}
551 551
552EAPI Eolian * 552EAPI Eolian_State *
553eolian_new(void) 553eolian_state_new(void)
554{ 554{
555 Eolian *state = calloc(1, sizeof(Eolian)); 555 Eolian_State *state = calloc(1, sizeof(Eolian_State));
556 if (!state) 556 if (!state)
557 return NULL; 557 return NULL;
558 558
@@ -576,7 +576,7 @@ eolian_new(void)
576} 576}
577 577
578EAPI void 578EAPI void
579eolian_free(Eolian *state) 579eolian_state_free(Eolian_State *state)
580{ 580{
581 if (!state) 581 if (!state)
582 return; 582 return;
@@ -621,7 +621,7 @@ join_path(const char *path, const char *file)
621static void 621static void
622_scan_cb(const char *name, const char *path, void *data EINA_UNUSED) 622_scan_cb(const char *name, const char *path, void *data EINA_UNUSED)
623{ 623{
624 Eolian *state = data; 624 Eolian_State *state = data;
625 Eina_Bool is_eo = eina_str_has_suffix(name, EO_SUFFIX); 625 Eina_Bool is_eo = eina_str_has_suffix(name, EO_SUFFIX);
626 if (!is_eo && !eina_str_has_suffix(name, EOT_SUFFIX)) return; 626 if (!is_eo && !eina_str_has_suffix(name, EOT_SUFFIX)) return;
627 eina_hash_add(is_eo ? state->filenames_eo : state->filenames_eot, 627 eina_hash_add(is_eo ? state->filenames_eo : state->filenames_eot,
@@ -629,7 +629,7 @@ _scan_cb(const char *name, const char *path, void *data EINA_UNUSED)
629} 629}
630 630
631EAPI Eina_Bool 631EAPI Eina_Bool
632eolian_directory_scan(Eolian *state, const char *dir) 632eolian_directory_scan(Eolian_State *state, const char *dir)
633{ 633{
634 if (!dir || !state) return EINA_FALSE; 634 if (!dir || !state) return EINA_FALSE;
635 eina_file_dir_list(dir, EINA_TRUE, _scan_cb, state); 635 eina_file_dir_list(dir, EINA_TRUE, _scan_cb, state);
@@ -637,7 +637,7 @@ eolian_directory_scan(Eolian *state, const char *dir)
637} 637}
638 638
639EAPI Eina_Bool 639EAPI Eina_Bool
640eolian_system_directory_scan(Eolian *state) 640eolian_system_directory_scan(Eolian_State *state)
641{ 641{
642 Eina_Bool ret; 642 Eina_Bool ret;
643 Eina_Strbuf *buf = eina_strbuf_new(); 643 Eina_Strbuf *buf = eina_strbuf_new();
@@ -769,7 +769,7 @@ _merge_units(Eolian_Unit *unit)
769} 769}
770 770
771EAPI const Eolian_Unit * 771EAPI const Eolian_Unit *
772eolian_file_parse(Eolian *state, const char *filepath) 772eolian_file_parse(Eolian_State *state, const char *filepath)
773{ 773{
774 if (!state) 774 if (!state)
775 return NULL; 775 return NULL;
@@ -788,7 +788,7 @@ eolian_file_parse(Eolian *state, const char *filepath)
788 788
789typedef struct _Parse_Data 789typedef struct _Parse_Data
790{ 790{
791 Eolian *state; 791 Eolian_State *state;
792 Eina_Bool ret; 792 Eina_Bool ret;
793} Parse_Data; 793} Parse_Data;
794 794
@@ -805,7 +805,7 @@ static Eina_Bool _tfile_parse(const Eina_Hash *hash EINA_UNUSED, const void *key
805} 805}
806 806
807EAPI Eina_Bool 807EAPI Eina_Bool
808eolian_all_eot_files_parse(Eolian *state) 808eolian_all_eot_files_parse(Eolian_State *state)
809{ 809{
810 Parse_Data pd = { state, EINA_TRUE }; 810 Parse_Data pd = { state, EINA_TRUE };
811 811
@@ -834,7 +834,7 @@ static Eina_Bool _file_parse(const Eina_Hash *hash EINA_UNUSED, const void *key
834} 834}
835 835
836EAPI Eina_Bool 836EAPI Eina_Bool
837eolian_all_eo_files_parse(Eolian *state) 837eolian_all_eo_files_parse(Eolian_State *state)
838{ 838{
839 Parse_Data pd = { state, EINA_TRUE }; 839 Parse_Data pd = { state, EINA_TRUE };
840 840
@@ -851,28 +851,28 @@ eolian_all_eo_files_parse(Eolian *state)
851} 851}
852 852
853EAPI Eina_Iterator * 853EAPI Eina_Iterator *
854eolian_all_eot_files_get(const Eolian *state) 854eolian_all_eot_files_get(const Eolian_State *state)
855{ 855{
856 if (!state) return NULL; 856 if (!state) return NULL;
857 return eina_hash_iterator_key_new(state->filenames_eot); 857 return eina_hash_iterator_key_new(state->filenames_eot);
858} 858}
859 859
860EAPI Eina_Iterator * 860EAPI Eina_Iterator *
861eolian_all_eo_files_get(const Eolian *state) 861eolian_all_eo_files_get(const Eolian_State *state)
862{ 862{
863 if (!state) return NULL; 863 if (!state) return NULL;
864 return eina_hash_iterator_key_new(state->filenames_eo); 864 return eina_hash_iterator_key_new(state->filenames_eo);
865} 865}
866 866
867EAPI Eina_Iterator * 867EAPI Eina_Iterator *
868eolian_all_eot_file_paths_get(const Eolian *state) 868eolian_all_eot_file_paths_get(const Eolian_State *state)
869{ 869{
870 if (!state) return NULL; 870 if (!state) return NULL;
871 return eina_hash_iterator_data_new(state->filenames_eot); 871 return eina_hash_iterator_data_new(state->filenames_eot);
872} 872}
873 873
874EAPI Eina_Iterator * 874EAPI Eina_Iterator *
875eolian_all_eo_file_paths_get(const Eolian *state) 875eolian_all_eo_file_paths_get(const Eolian_State *state)
876{ 876{
877 if (!state) return NULL; 877 if (!state) return NULL;
878 return eina_hash_iterator_data_new(state->filenames_eo); 878 return eina_hash_iterator_data_new(state->filenames_eo);
diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h
index 58fd1c8d16..4eed189fbe 100644
--- a/src/lib/eolian/eolian_database.h
+++ b/src/lib/eolian/eolian_database.h
@@ -33,7 +33,7 @@ extern Eina_Prefix *_eolian_prefix;
33 33
34struct _Eolian_Unit 34struct _Eolian_Unit
35{ 35{
36 Eolian *state; 36 Eolian_State *state;
37 Eina_Hash *children; 37 Eina_Hash *children;
38 Eina_Hash *classes; 38 Eina_Hash *classes;
39 Eina_Hash *globals; 39 Eina_Hash *globals;
@@ -44,7 +44,7 @@ struct _Eolian_Unit
44 Eina_Hash *decls; 44 Eina_Hash *decls;
45}; 45};
46 46
47struct _Eolian 47struct _Eolian_State
48{ 48{
49 Eolian_Unit unit; 49 Eolian_Unit unit;
50 50
@@ -338,7 +338,7 @@ struct _Eolian_Variable
338}; 338};
339 339
340char *database_class_to_filename(const char *cname); 340char *database_class_to_filename(const char *cname);
341Eina_Bool database_validate(Eolian *state, const Eolian_Unit *src); 341Eina_Bool database_validate(Eolian_State *state, const Eolian_Unit *src);
342 342
343void database_decl_add(Eolian_Unit *unit, Eina_Stringshare *name, 343void database_decl_add(Eolian_Unit *unit, Eina_Stringshare *name,
344 Eolian_Declaration_Type type, 344 Eolian_Declaration_Type type,
@@ -346,7 +346,7 @@ void database_decl_add(Eolian_Unit *unit, Eina_Stringshare *name,
346 346
347void database_doc_del(Eolian_Documentation *doc); 347void database_doc_del(Eolian_Documentation *doc);
348 348
349void database_unit_init(Eolian *state, Eolian_Unit *unit); 349void database_unit_init(Eolian_State *state, Eolian_Unit *unit);
350void database_unit_del(Eolian_Unit *unit); 350void database_unit_del(Eolian_Unit *unit);
351 351
352/* types */ 352/* types */
diff --git a/src/lib/eolian_cxx/Eolian_Cxx.hh b/src/lib/eolian_cxx/Eolian_Cxx.hh
index ec5062fee3..2eb9736cb0 100644
--- a/src/lib/eolian_cxx/Eolian_Cxx.hh
+++ b/src/lib/eolian_cxx/Eolian_Cxx.hh
@@ -26,14 +26,14 @@ struct eolian_init
26 26
27struct eolian_state 27struct eolian_state
28{ 28{
29 Eolian *value; 29 Eolian_State *value;
30 eolian_state() 30 eolian_state()
31 { 31 {
32 value = ::eolian_new(); 32 value = ::eolian_state_new();
33 } 33 }
34 ~eolian_state() 34 ~eolian_state()
35 { 35 {
36 ::eolian_free(value); 36 ::eolian_state_free(value);
37 } 37 }
38 38
39 inline Eolian_Unit const* as_unit() const 39 inline Eolian_Unit const* as_unit() const