@@ -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);
@@ -489,7 +489,7 @@ class context {
489489 switch (sp->container_type ()) {
490490 case CT_ARRAY_ITEM:
491491 unpack_array_item (sp->obj (), obj);
492- if (sp->decl_count () == 0 ) {
492+ if (sp->decr_count () == 0 ) {
493493 obj = sp->obj ();
494494 --m_top;
495495 /* printf("stack pop %d\n", m_top);*/
@@ -505,7 +505,7 @@ class context {
505505 break ;
506506 case CT_MAP_VALUE:
507507 unpack_map_item (sp->obj (), sp->map_key (), obj);
508- if (sp->decl_count () == 0 ) {
508+ if (sp->decr_count () == 0 ) {
509509 obj = sp->obj ();
510510 --m_top;
511511 /* printf("stack pop %d\n", m_top);*/
@@ -1239,7 +1239,7 @@ inline unpacker& unpacker::operator=(unpacker&& other) {
12391239inline unpacker::~unpacker ()
12401240{
12411241 // These checks are required for move operations.
1242- if (m_buffer) detail::decl_count (m_buffer);
1242+ if (m_buffer) detail::decr_count (m_buffer);
12431243}
12441244
12451245
@@ -1303,15 +1303,15 @@ inline void unpacker::expand_buffer(std::size_t size)
13031303
13041304 if (m_ctx.user ().referenced ()) {
13051305 try {
1306- m_z->push_finalizer (&detail::decl_count , m_buffer);
1306+ m_z->push_finalizer (&detail::decr_count , m_buffer);
13071307 }
13081308 catch (...) {
13091309 ::free (tmp);
13101310 throw ;
13111311 }
13121312 m_ctx.user ().set_referenced (false );
13131313 } else {
1314- detail::decl_count (m_buffer);
1314+ detail::decr_count (m_buffer);
13151315 }
13161316
13171317 m_buffer = tmp;
@@ -1421,7 +1421,7 @@ inline bool unpacker::flush_zone()
14211421{
14221422 if (m_ctx.user ().referenced ()) {
14231423 try {
1424- m_z->push_finalizer (&detail::decl_count , m_buffer);
1424+ m_z->push_finalizer (&detail::decr_count , m_buffer);
14251425 } catch (...) {
14261426 return false ;
14271427 }
0 commit comments