summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-08-21 16:34:40 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-08-21 16:35:59 +0100
commitcdd4860520f428f64dbf8ddb3ae05cf6bc75cf41 (patch)
tree72f3d8ae6a30f1d5948cf35a0851fd578e34a987 /src/bin
parentc1afa1b6b5b90df8e688841d84a250fe03e9f029 (diff)
eolian: turn db validation into separate API
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/elua/modules/lualian.lua3
-rw-r--r--src/bin/eolian/main.c6
-rw-r--r--src/bin/eolian_cxx/eolian_cxx.cc6
3 files changed, 15 insertions, 0 deletions
diff --git a/src/bin/elua/modules/lualian.lua b/src/bin/elua/modules/lualian.lua
index 9b664a2301..1a963f73a6 100644
--- a/src/bin/elua/modules/lualian.lua
+++ b/src/bin/elua/modules/lualian.lua
@@ -677,6 +677,9 @@ M.generate = function(fname, libname, fstream)
677 if not eolian.eo_file_parse(fname) then 677 if not eolian.eo_file_parse(fname) then
678 error("Failed parsing file: " .. fname) 678 error("Failed parsing file: " .. fname)
679 end 679 end
680 if not eolian.database_validate() then
681 error("Failed validating database.")
682 end
680 local sfn = fname:match(".*[\\/](.+)$") or fname 683 local sfn = fname:match(".*[\\/](.+)$") or fname
681 local klass = eolian.class_get_by_file(sfn) 684 local klass = eolian.class_get_by_file(sfn)
682 local tp = klass:type_get() 685 local tp = klass:type_get()
diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c
index bcd13fc482..fed76e94b6 100644
--- a/src/bin/eolian/main.c
+++ b/src/bin/eolian/main.c
@@ -358,6 +358,12 @@ int main(int argc, char **argv)
358 goto end; 358 goto end;
359 } 359 }
360 360
361 if (!eolian_database_validate())
362 {
363 ERR("Error validating database.\n");
364 goto end;
365 }
366
361 eo_filename_copy = strdup(eo_filename); 367 eo_filename_copy = strdup(eo_filename);
362 eo_file_basename = basename(eo_filename_copy); 368 eo_file_basename = basename(eo_filename_copy);
363 if (show) 369 if (show)
diff --git a/src/bin/eolian_cxx/eolian_cxx.cc b/src/bin/eolian_cxx/eolian_cxx.cc
index 8090f3cf97..4a689c50fb 100644
--- a/src/bin/eolian_cxx/eolian_cxx.cc
+++ b/src/bin/eolian_cxx/eolian_cxx.cc
@@ -219,6 +219,12 @@ database_load(options_type const& opts)
219 << "Eolian failed parsing input files"; 219 << "Eolian failed parsing input files";
220 assert(false && "Error parsing input files"); 220 assert(false && "Error parsing input files");
221 } 221 }
222 if (!::eolian_database_validate())
223 {
224 EINA_CXX_DOM_LOG_ERR(eolian_cxx::domain)
225 << "Eolian failed validating database.";
226 assert(false && "Error validating database");
227 }
222} 228}
223 229
224} // namespace eolian_cxx { 230} // namespace eolian_cxx {