diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index 344f6a94..8c38fffe 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -652,6 +652,16 @@ class QPDFObjectHandle QPDFObjectHandle(QPDF*, int objid, int generation); QPDFObjectHandle(QPDFObject*); + enum parser_state_e + { + st_top, + st_start, + st_stop, + st_eof, + st_dictionary, + st_array + }; + // Private object factory methods static QPDFObjectHandle newIndirect(QPDF*, int objid, int generation); static QPDFObjectHandle newStream( diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc index e854253a..888d9a3a 100644 --- a/libqpdf/QPDFObjectHandle.cc +++ b/libqpdf/QPDFObjectHandle.cc @@ -965,8 +965,7 @@ QPDFObjectHandle::parseInternal(PointerHolder input, std::vector > olist_stack; olist_stack.push_back(std::vector()); - enum state_e { st_top, st_start, st_stop, st_eof, st_dictionary, st_array }; - std::vector state_stack; + std::vector state_stack; state_stack.push_back(st_top); std::vector offset_stack; offset_stack.push_back(input->tell()); @@ -974,7 +973,7 @@ QPDFObjectHandle::parseInternal(PointerHolder input, while (! done) { std::vector& olist = olist_stack.back(); - state_e state = state_stack.back(); + parser_state_e state = state_stack.back(); qpdf_offset_t offset = offset_stack.back(); object = QPDFObjectHandle(); @@ -1193,7 +1192,7 @@ QPDFObjectHandle::parseInternal(PointerHolder input, "QPDFObjectHandle::parseInternal: st_stop encountered" " with insufficient elements in stack"); } - state_e old_state = state_stack.back(); + parser_state_e old_state = state_stack.back(); state_stack.pop_back(); if (old_state == st_array) {