mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
add cfg_obj_asboolean()
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: parser.c,v 1.12 2001/02/22 00:36:24 gson Exp $ */
|
||||
/* $Id: parser.c,v 1.13 2001/02/22 01:40:51 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -1568,6 +1568,12 @@ cfg_obj_asstring(cfg_obj_t *obj) {
|
||||
return (obj->value.string.base);
|
||||
}
|
||||
|
||||
isc_boolean_t
|
||||
cfg_obj_asboolean(cfg_obj_t *obj) {
|
||||
REQUIRE(obj != NULL && obj->type->rep == &cfg_rep_boolean);
|
||||
return (obj->value.boolean);
|
||||
}
|
||||
|
||||
/* Quoted string only */
|
||||
static cfg_type_t cfg_type_qstring = {
|
||||
"qstring", parse_qstring, print_qstring, &cfg_rep_string, NULL };
|
||||
|
Reference in New Issue
Block a user