summaryrefslogtreecommitdiffstats
path: root/ini/ini_config_priv.h
diff options
context:
space:
mode:
authorDmitri Pal <dpal@redhat.com>2012-12-24 17:45:00 -0500
committerOndrej Kos <okos@redhat.com>2013-01-24 08:34:51 +0100
commit6823d7104cca0f8ac22ed9432ee8a2f1a0d9124a (patch)
tree51c9c817e8335c0001f3c012819760bfcf6a1681 /ini/ini_config_priv.h
parentfa00e2e16e5c1d3ac56f1bbd3a84875642d0bb39 (diff)
downloadding-libs-6823d7104cca0f8ac22ed9432ee8a2f1a0d9124a.tar.gz
ding-libs-6823d7104cca0f8ac22ed9432ee8a2f1a0d9124a.tar.xz
ding-libs-6823d7104cca0f8ac22ed9432ee8a2f1a0d9124a.zip
More interface refactoring
I also realized that error list processing should not be bound to the file object. This patch corrects that by moving the error_list and corresponding count from file object to the config object. Things updated by the patch: 1. The internal variables are moved from file obj to config obj. 2. The external header is updated to reflect the change 3. Functions are moved from file obj module to config obj module. 4. Parser code is updated because error validation was in the wrong place 5. Unit test is adjusted to get error list from the right object. I had to adjust the copy function for the config object. Copy function does not copy over the error list.
Diffstat (limited to 'ini/ini_config_priv.h')
-rw-r--r--ini/ini_config_priv.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/ini/ini_config_priv.h b/ini/ini_config_priv.h
index ee6a4d7..31cee84 100644
--- a/ini/ini_config_priv.h
+++ b/ini/ini_config_priv.h
@@ -42,6 +42,10 @@ struct ini_cfgobj {
int section_len;
int name_len;
struct collection_iterator *iterator;
+ /* Collection of errors detected during parsing */
+ struct collection_item *error_list;
+ /* Count of error lines */
+ unsigned count;
/*... */
/* Statistics? Timestamps? When created? Modified? - TBD */
@@ -63,12 +67,8 @@ struct ini_cfgfile {
/**********************/
/* Internal variables */
/**********************/
- /* Collection of errors detected during parsing */
- struct collection_item *error_list;
/* File stats */
struct stat file_stats;
- /* Count of error lines */
- unsigned count;
};
/* Parsing error */