@@ -335,7 +335,7 @@ class unpack_stack {
335335 void set_obj (object const & obj) { m_obj = obj; }
336336 std::size_t count () const { return m_count; }
337337 void set_count (std::size_t count) { m_count = count; }
338- std::size_t decl_count () { return --m_count; }
338+ std::size_t decr_count () { return --m_count; }
339339 uint32_t container_type () const { return m_container_type; }
340340 void set_container_type (uint32_t container_type) { m_container_type = container_type; }
341341 object const & map_key () const { return m_map_key; }
@@ -352,7 +352,7 @@ inline void init_count(void* buffer)
352352 *reinterpret_cast <volatile _msgpack_atomic_counter_t *>(buffer) = 1 ;
353353}
354354
355- inline void decl_count (void * buffer)
355+ inline void decr_count (void * buffer)
356356{
357357 if (_msgpack_sync_decr_and_fetch (reinterpret_cast <volatile _msgpack_atomic_counter_t *>(buffer)) == 0 ) {
358358 free (buffer);
@@ -483,7 +483,7 @@ class context {
483483 switch (sp.container_type ()) {
484484 case MSGPACK_CT_ARRAY_ITEM:
485485 unpack_array_item (sp.obj (), obj);
486- if (sp.decl_count () == 0 ) {
486+ if (sp.decr_count () == 0 ) {
487487 obj = sp.obj ();
488488 m_stack.pop_back ();
489489 }
@@ -498,7 +498,7 @@ class context {
498498 break ;
499499 case MSGPACK_CT_MAP_VALUE:
500500 unpack_map_item (sp.obj (), sp.map_key (), obj);
501- if (sp.decl_count () == 0 ) {
501+ if (sp.decr_count () == 0 ) {
502502 obj = sp.obj ();
503503 m_stack.pop_back ();
504504 }
@@ -1228,7 +1228,7 @@ inline unpacker& unpacker::operator=(unpacker&& other) {
12281228inline unpacker::~unpacker ()
12291229{
12301230 // These checks are required for move operations.
1231- if (m_buffer) detail::decl_count (m_buffer);
1231+ if (m_buffer) detail::decr_count (m_buffer);
12321232}
12331233
12341234
@@ -1292,15 +1292,15 @@ inline void unpacker::expand_buffer(std::size_t size)
12921292
12931293 if (m_ctx.user ().referenced ()) {
12941294 try {
1295- m_z->push_finalizer (&detail::decl_count , m_buffer);
1295+ m_z->push_finalizer (&detail::decr_count , m_buffer);
12961296 }
12971297 catch (...) {
12981298 ::free (tmp);
12991299 throw ;
13001300 }
13011301 m_ctx.user ().set_referenced (false );
13021302 } else {
1303- detail::decl_count (m_buffer);
1303+ detail::decr_count (m_buffer);
13041304 }
13051305
13061306 m_buffer = tmp;
@@ -1410,7 +1410,7 @@ inline bool unpacker::flush_zone()
14101410{
14111411 if (m_ctx.user ().referenced ()) {
14121412 try {
1413- m_z->push_finalizer (&detail::decl_count , m_buffer);
1413+ m_z->push_finalizer (&detail::decr_count , m_buffer);
14141414 } catch (...) {
14151415 return false ;
14161416 }
0 commit comments