@@ -1335,7 +1335,7 @@ inline void unpacker::remove_nonparsed_buffer()
13351335
13361336namespace detail {
13371337
1338- inline unpack_return
1338+ inline parse_return
13391339unpack_imp (const char * data, std::size_t len, std::size_t & off,
13401340 msgpack::zone& result_zone, msgpack::object& result, bool & referenced,
13411341 unpack_reference_func f = MSGPACK_NULLPTR, void * user_data = MSGPACK_NULLPTR,
@@ -1345,7 +1345,7 @@ unpack_imp(const char* data, std::size_t len, std::size_t& off,
13451345
13461346 if (len <= noff) {
13471347 // FIXME
1348- return UNPACK_CONTINUE ;
1348+ return PARSE_CONTINUE ;
13491349 }
13501350
13511351 detail::context ctx (f, user_data, limit);
@@ -1357,23 +1357,23 @@ unpack_imp(const char* data, std::size_t len, std::size_t& off,
13571357
13581358 int e = ctx.execute (data, len, noff);
13591359 if (e < 0 ) {
1360- return UNPACK_PARSE_ERROR ;
1360+ return PARSE_PARSE_ERROR ;
13611361 }
13621362
13631363 referenced = ctx.user ().referenced ();
13641364 off = noff;
13651365
13661366 if (e == 0 ) {
1367- return UNPACK_CONTINUE ;
1367+ return PARSE_CONTINUE ;
13681368 }
13691369
13701370 result = ctx.data ();
13711371
13721372 if (noff < len) {
1373- return UNPACK_EXTRA_BYTES ;
1373+ return PARSE_EXTRA_BYTES ;
13741374 }
13751375
1376- return UNPACK_SUCCESS ;
1376+ return PARSE_SUCCESS ;
13771377}
13781378
13791379} // detail
@@ -1390,19 +1390,19 @@ inline msgpack::object_handle unpack(
13901390 msgpack::unique_ptr<msgpack::zone> z (new msgpack::zone);
13911391 referenced = false ;
13921392 std::size_t noff = off;
1393- unpack_return ret = detail::unpack_imp (
1393+ parse_return ret = detail::unpack_imp (
13941394 data, len, noff, *z, obj, referenced, f, user_data, limit);
13951395
13961396 switch (ret) {
1397- case UNPACK_SUCCESS :
1397+ case PARSE_SUCCESS :
13981398 off = noff;
13991399 return msgpack::object_handle (obj, msgpack::move (z));
1400- case UNPACK_EXTRA_BYTES :
1400+ case PARSE_EXTRA_BYTES :
14011401 off = noff;
14021402 return msgpack::object_handle (obj, msgpack::move (z));
1403- case UNPACK_CONTINUE :
1403+ case PARSE_CONTINUE :
14041404 throw msgpack::insufficient_bytes (" insufficient bytes" );
1405- case UNPACK_PARSE_ERROR :
1405+ case PARSE_PARSE_ERROR :
14061406 default :
14071407 throw msgpack::parse_error (" parse error" );
14081408 }
@@ -1447,23 +1447,23 @@ inline void unpack(
14471447 msgpack::unique_ptr<msgpack::zone> z (new msgpack::zone);
14481448 referenced = false ;
14491449 std::size_t noff = off;
1450- unpack_return ret = detail::unpack_imp (
1450+ parse_return ret = detail::unpack_imp (
14511451 data, len, noff, *z, obj, referenced, f, user_data, limit);
14521452
14531453 switch (ret) {
1454- case UNPACK_SUCCESS :
1454+ case PARSE_SUCCESS :
14551455 off = noff;
14561456 result.set (obj);
14571457 result.zone () = msgpack::move (z);
14581458 return ;
1459- case UNPACK_EXTRA_BYTES :
1459+ case PARSE_EXTRA_BYTES :
14601460 off = noff;
14611461 result.set (obj);
14621462 result.zone () = msgpack::move (z);
14631463 return ;
1464- case UNPACK_CONTINUE :
1464+ case PARSE_CONTINUE :
14651465 throw msgpack::insufficient_bytes (" insufficient bytes" );
1466- case UNPACK_PARSE_ERROR :
1466+ case PARSE_PARSE_ERROR :
14671467 default :
14681468 throw msgpack::parse_error (" parse error" );
14691469 }
@@ -1510,19 +1510,19 @@ inline msgpack::object unpack(
15101510 msgpack::object obj;
15111511 std::size_t noff = off;
15121512 referenced = false ;
1513- unpack_return ret = detail::unpack_imp (
1513+ parse_return ret = detail::unpack_imp (
15141514 data, len, noff, z, obj, referenced, f, user_data, limit);
15151515
15161516 switch (ret) {
1517- case UNPACK_SUCCESS :
1517+ case PARSE_SUCCESS :
15181518 off = noff;
15191519 return obj;
1520- case UNPACK_EXTRA_BYTES :
1520+ case PARSE_EXTRA_BYTES :
15211521 off = noff;
15221522 return obj;
1523- case UNPACK_CONTINUE :
1523+ case PARSE_CONTINUE :
15241524 throw msgpack::insufficient_bytes (" insufficient bytes" );
1525- case UNPACK_PARSE_ERROR :
1525+ case PARSE_PARSE_ERROR :
15261526 default :
15271527 throw msgpack::parse_error (" parse error" );
15281528 }
0 commit comments