mirror of
https://github.com/stefanocasazza/ULib.git
synced 2025-09-28 19:05:55 +08:00
sync
This commit is contained in:
parent
a306894a4c
commit
39e63b9a83
|
@ -1109,7 +1109,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void push_back(const UStringRep* rep) { UVector<UStringRep*>::push_back(rep); }
|
void push_back(const UStringRep* rep) { UVector<UStringRep*>::push_back(rep); }
|
||||||
void push_back(const char* t, uint32_t tlen) { UVector<UStringRep*>::push_back(UStringRep::create(tlen, tlen, t)); }
|
|
||||||
|
|
||||||
UString last() // return last element
|
UString last() // return last element
|
||||||
{
|
{
|
||||||
|
|
|
@ -7250,7 +7250,7 @@ static void POST_login_request()
|
||||||
if (user_rec->_auth_domain != *account_auth)
|
if (user_rec->_auth_domain != *account_auth)
|
||||||
{
|
{
|
||||||
vec.push_back(user_rec->nodog);
|
vec.push_back(user_rec->nodog);
|
||||||
vec.push_back(U_CLIENT_ADDRESS_TO_PARAM);
|
vec.push_back(UStringRep::create(UServer_Base::client_address_len, UServer_Base::client_address_len, UServer_Base::client_address));
|
||||||
vec.push_back(*UString::str_without_mac);
|
vec.push_back(*UString::str_without_mac);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,14 +194,15 @@ public:
|
||||||
void* ptr = (index == 0 ? (void*)pblock : *pblock);
|
void* ptr = (index == 0 ? (void*)pblock : *pblock);
|
||||||
|
|
||||||
# ifdef DEBUG
|
# ifdef DEBUG
|
||||||
if (index)
|
if (len &&
|
||||||
|
index)
|
||||||
{
|
{
|
||||||
U_INTERNAL_ASSERT_EQUALS( ptr, *pblock)
|
for (uint32_t i = 1; i < len; ++i)
|
||||||
U_INTERNAL_ASSERT_EQUALS( ptr, *(pointer_block + len))
|
|
||||||
|
|
||||||
if (len)
|
|
||||||
{
|
{
|
||||||
U_INTERNAL_ASSERT_DIFFERS(ptr, *(pointer_block + len - 1))
|
if (ptr == *(pointer_block + len - i))
|
||||||
|
{
|
||||||
|
U_ERROR("Duplicate entry on UStackMemoryPool::pop(%u): len = %u i = %u ptr = %p", index, len, i, ptr)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,6 +240,14 @@ public:
|
||||||
if (depth) --depth;
|
if (depth) --depth;
|
||||||
|
|
||||||
++push_cnt;
|
++push_cnt;
|
||||||
|
|
||||||
|
for (uint32_t i = 2; i <= len; ++i)
|
||||||
|
{
|
||||||
|
if (ptr == *(pointer_block + len - i))
|
||||||
|
{
|
||||||
|
U_ERROR("Duplicate entry on UStackMemoryPool::push(%p): index = %u len = %u i = %u", ptr, index, len, i)
|
||||||
|
}
|
||||||
|
}
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -396,9 +405,13 @@ void* UMemoryPool::pop(int stack_index)
|
||||||
obj_class, func_call, pstack->index, pstack->type, pstack->len, pstack->space, pstack->depth,
|
obj_class, func_call, pstack->index, pstack->type, pstack->len, pstack->space, pstack->depth,
|
||||||
pstack->max_depth, pstack->num_call_allocateMemoryBlocks, pstack->pop_cnt, pstack->push_cnt);
|
pstack->max_depth, pstack->num_call_allocateMemoryBlocks, pstack->pop_cnt, pstack->push_cnt);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
void* ptr = pstack->pop();
|
||||||
|
|
||||||
|
U_RETURN(ptr);
|
||||||
|
#else
|
||||||
return pstack->pop();
|
return pstack->pop();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
# ifdef DEBUG
|
# ifdef DEBUG
|
||||||
|
|
|
@ -61,7 +61,6 @@ void UThread::close()
|
||||||
if (pthread_equal(tid, obj->tid))
|
if (pthread_equal(tid, obj->tid))
|
||||||
# endif
|
# endif
|
||||||
{
|
{
|
||||||
U_INTERNAL_ASSERT_EQUALS(this, obj)
|
|
||||||
U_INTERNAL_ASSERT_EQUALS(next, obj->next)
|
U_INTERNAL_ASSERT_EQUALS(next, obj->next)
|
||||||
|
|
||||||
*ptr = next;
|
*ptr = next;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0757
|
077A
|
||||||
|
|
Loading…
Reference in New Issue
Block a user