mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
chore(Deps/Acelite): Update to 6.5.10 (#3450)
This commit is contained in:
39
deps/acelite/ace/Configuration.cpp
vendored
39
deps/acelite/ace/Configuration.cpp
vendored
@@ -13,6 +13,10 @@
|
||||
#include "ace/Configuration.inl"
|
||||
#endif /* __ACE_INLINE__ */
|
||||
|
||||
#if defined (ACE_HAS_ALLOC_HOOKS)
|
||||
# include "ace/Malloc_Base.h"
|
||||
#endif /* ACE_HAS_ALLOC_HOOKS */
|
||||
|
||||
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
|
||||
|
||||
ACE_Section_Key_Internal::ACE_Section_Key_Internal (void)
|
||||
@@ -103,7 +107,7 @@ int
|
||||
ACE_Configuration::expand_path (const ACE_Configuration_Section_Key& key,
|
||||
const ACE_TString& path_in,
|
||||
ACE_Configuration_Section_Key& key_out,
|
||||
int create)
|
||||
bool create)
|
||||
{
|
||||
// Make a copy of key
|
||||
ACE_Configuration_Section_Key current_section = key;
|
||||
@@ -333,8 +337,13 @@ ACE_Configuration::operator== (const ACE_Configuration& rhs) const
|
||||
rc = (* (thisCharData + count) == * (rhsCharData + count));
|
||||
}
|
||||
|
||||
#if defined (ACE_HAS_ALLOC_HOOKS)
|
||||
ACE_Allocator::instance()->free(thisCharData);
|
||||
ACE_Allocator::instance()->free(rhsCharData);
|
||||
#else
|
||||
delete [] thisCharData;
|
||||
delete [] rhsCharData;
|
||||
#endif /* ACE_HAS_ALLOC_HOOKS */
|
||||
}// end if the length's match
|
||||
}
|
||||
// We should never have valueTypes of INVALID, therefore
|
||||
@@ -449,7 +458,8 @@ ACE_Configuration_Win32Registry::operator!= (const ACE_Configuration_Win32Regist
|
||||
return true;
|
||||
}
|
||||
|
||||
ACE_Configuration_Win32Registry::ACE_Configuration_Win32Registry (HKEY hKey)
|
||||
ACE_Configuration_Win32Registry::ACE_Configuration_Win32Registry (HKEY hKey, u_long security_access)
|
||||
: security_access_ (security_access)
|
||||
{
|
||||
ACE_Section_Key_Win32 *temp = 0;
|
||||
|
||||
@@ -466,7 +476,7 @@ ACE_Configuration_Win32Registry::~ACE_Configuration_Win32Registry (void)
|
||||
int
|
||||
ACE_Configuration_Win32Registry::open_section (const ACE_Configuration_Section_Key& base,
|
||||
const ACE_TCHAR* sub_section,
|
||||
int create,
|
||||
bool create,
|
||||
ACE_Configuration_Section_Key& result)
|
||||
{
|
||||
if (validate_name (sub_section, 1))
|
||||
@@ -481,7 +491,7 @@ ACE_Configuration_Win32Registry::open_section (const ACE_Configuration_Section_K
|
||||
if ((errnum = ACE_TEXT_RegOpenKeyEx (base_key,
|
||||
sub_section,
|
||||
0,
|
||||
KEY_ALL_ACCESS,
|
||||
security_access_,
|
||||
&result_key)) != ERROR_SUCCESS)
|
||||
{
|
||||
if (!create)
|
||||
@@ -495,7 +505,7 @@ ACE_Configuration_Win32Registry::open_section (const ACE_Configuration_Section_K
|
||||
0,
|
||||
0,
|
||||
REG_OPTION_NON_VOLATILE,
|
||||
KEY_ALL_ACCESS,
|
||||
security_access_,
|
||||
0,
|
||||
&result_key,
|
||||
(PDWORD) 0
|
||||
@@ -970,7 +980,8 @@ ACE_Configuration_Win32Registry::load_key (const ACE_Configuration_Section_Key&
|
||||
HKEY
|
||||
ACE_Configuration_Win32Registry::resolve_key (HKEY hKey,
|
||||
const ACE_TCHAR* path,
|
||||
int create)
|
||||
bool create,
|
||||
u_long security_access)
|
||||
{
|
||||
HKEY result = 0;
|
||||
// Make a copy of hKey
|
||||
@@ -1021,7 +1032,7 @@ ACE_Configuration_Win32Registry::resolve_key (HKEY hKey,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
KEY_ALL_ACCESS,
|
||||
security_access,
|
||||
0,
|
||||
&subkey,
|
||||
(PDWORD) 0
|
||||
@@ -1211,9 +1222,15 @@ ACE_Configuration_Section_Key_Heap::~ACE_Configuration_Section_Key_Heap ()
|
||||
{
|
||||
delete value_iter_;
|
||||
delete section_iter_;
|
||||
#if defined (ACE_HAS_ALLOC_HOOKS)
|
||||
ACE_Allocator::instance()->free (path_);
|
||||
#else
|
||||
ACE_OS::free (path_);
|
||||
#endif /* ACE_HAS_ALLOC_HOOKS */
|
||||
}
|
||||
|
||||
ACE_ALLOC_HOOK_DEFINE(ACE_Configuration_Section_Key_Heap)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ACE_Configuration_Heap::ACE_Configuration_Heap (void)
|
||||
@@ -1507,7 +1524,7 @@ ACE_Configuration_Heap::section_open_helper (size_t hash_table_size,
|
||||
int
|
||||
ACE_Configuration_Heap::open_section (const ACE_Configuration_Section_Key& base,
|
||||
const ACE_TCHAR* sub_section,
|
||||
int create,
|
||||
bool create,
|
||||
ACE_Configuration_Section_Key& result)
|
||||
{
|
||||
ACE_ASSERT (this->allocator_);
|
||||
@@ -1534,7 +1551,7 @@ ACE_Configuration_Heap::open_section (const ACE_Configuration_Section_Key& base,
|
||||
int
|
||||
ACE_Configuration_Heap::open_simple_section (const ACE_Configuration_Section_Key& base,
|
||||
const ACE_TCHAR* sub_section,
|
||||
int create,
|
||||
bool create,
|
||||
ACE_Configuration_Section_Key& result)
|
||||
{
|
||||
ACE_TString section (0, 0, false);
|
||||
@@ -2054,7 +2071,11 @@ ACE_Configuration_Heap::get_binary_value (
|
||||
}
|
||||
|
||||
// Make a copy
|
||||
#if defined (ACE_HAS_ALLOC_HOOKS)
|
||||
ACE_ALLOCATOR_RETURN (data, static_cast<char*> (ACE_Allocator::instance()->malloc(sizeof(char) * VIntId.length_)), -1);
|
||||
#else
|
||||
ACE_NEW_RETURN (data, char[VIntId.length_], -1);
|
||||
#endif /* ACE_HAS_ALLOC_HOOKS */
|
||||
ACE_OS::memcpy (data, VIntId.data_.ptr_, VIntId.length_);
|
||||
length = VIntId.length_;
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user