aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/libucl/ucl.h3
-rw-r--r--contrib/libucl/ucl_parser.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/contrib/libucl/ucl.h b/contrib/libucl/ucl.h
index ee683b163..ee03334e0 100644
--- a/contrib/libucl/ucl.h
+++ b/contrib/libucl/ucl.h
@@ -154,7 +154,8 @@ typedef enum ucl_parser_flags {
UCL_PARSER_NO_TIME = (1 << 2), /**< Do not parse time and treat time values as strings */
UCL_PARSER_NO_IMPLICIT_ARRAYS = (1 << 3), /** Create explicit arrays instead of implicit ones */
UCL_PARSER_SAVE_COMMENTS = (1 << 4), /** Save comments in the parser context */
- UCL_PARSER_DISABLE_MACRO = (1 << 5) /** Treat macros as comments */
+ UCL_PARSER_DISABLE_MACRO = (1 << 5), /** Treat macros as comments */
+ UCL_PARSER_NO_FILEVARS = (1 << 6) /** Do not set file vars */
} ucl_parser_flags_t;
/**
diff --git a/contrib/libucl/ucl_parser.c b/contrib/libucl/ucl_parser.c
index 82c4ca24b..d6b8eb656 100644
--- a/contrib/libucl/ucl_parser.c
+++ b/contrib/libucl/ucl_parser.c
@@ -2461,8 +2461,10 @@ ucl_parser_new (int flags)
parser->comments = ucl_object_typed_new (UCL_OBJECT);
}
- /* Initial assumption about filevars */
- ucl_parser_set_filevars (parser, NULL, false);
+ if (!(flags & UCL_PARSER_NO_FILEVARS)) {
+ /* Initial assumption about filevars */
+ ucl_parser_set_filevars (parser, NULL, false);
+ }
return parser;
}