From f7679a3d50538a48b5f7cb46fad287eb1e420527 Mon Sep 17 00:00:00 2001 From: Bernhard Amann Date: Tue, 15 Jan 2013 15:03:20 -0800 Subject: [PATCH] add opaque type-ignoring for the accept_unsupported_types input framework option. Allows reading of records that contain &optional opaque-entries when accept_unsupported_types=T --- src/input/Manager.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/input/Manager.cc b/src/input/Manager.cc index 33f612cddd..1082a003e9 100644 --- a/src/input/Manager.cc +++ b/src/input/Manager.cc @@ -794,15 +794,16 @@ bool Manager::UnrollRecordType(vector *fields, const RecordType *rec, if ( allow_file_func ) { if ( ( rec->FieldType(i)->Tag() == TYPE_FILE || - rec->FieldType(i)->Tag() == TYPE_FUNC ) && + rec->FieldType(i)->Tag() == TYPE_FUNC || + rec->FieldType(i)->Tag() == TYPE_OPAQUE ) && rec->FieldDecl(i)->FindAttr(ATTR_OPTIONAL) ) { - reporter->Info("Encountered incompatible type \"%s\" in table definition for ReaderFrontend. Ignoring field.", type_name(rec->FieldType(i)->Tag())); + reporter->Info("Encountered incompatible type \"%s\" in type definition for ReaderFrontend. Ignoring optional field.", type_name(rec->FieldType(i)->Tag())); continue; } } - reporter->Error("Incompatible type \"%s\" in table definition for ReaderFrontend", type_name(rec->FieldType(i)->Tag())); + reporter->Error("Incompatible type \"%s\" in type definition for ReaderFrontend", type_name(rec->FieldType(i)->Tag())); return false; }