mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
synced 2025-11-03 03:57:49 +00:00
- fixed SF# 2123266: Memory leak under QNX6 with dinkum library
This commit is contained in:
@@ -75,7 +75,6 @@ namespace
|
|||||||
{
|
{
|
||||||
case MYSQL_TYPE_TINY: return sizeof(char);
|
case MYSQL_TYPE_TINY: return sizeof(char);
|
||||||
case MYSQL_TYPE_SHORT: return sizeof(short);
|
case MYSQL_TYPE_SHORT: return sizeof(short);
|
||||||
case MYSQL_TYPE_INT24:
|
|
||||||
case MYSQL_TYPE_LONG: return sizeof(Poco::Int32);
|
case MYSQL_TYPE_LONG: return sizeof(Poco::Int32);
|
||||||
case MYSQL_TYPE_FLOAT: return sizeof(float);
|
case MYSQL_TYPE_FLOAT: return sizeof(float);
|
||||||
case MYSQL_TYPE_DOUBLE: return sizeof(double);
|
case MYSQL_TYPE_DOUBLE: return sizeof(double);
|
||||||
@@ -124,7 +123,6 @@ namespace
|
|||||||
if (unsig) return Poco::Data::MetaColumn::FDT_UINT16;
|
if (unsig) return Poco::Data::MetaColumn::FDT_UINT16;
|
||||||
return Poco::Data::MetaColumn::FDT_INT16;
|
return Poco::Data::MetaColumn::FDT_INT16;
|
||||||
|
|
||||||
CASE MYSQL_TYPE_INT24:
|
|
||||||
case MYSQL_TYPE_LONG:
|
case MYSQL_TYPE_LONG:
|
||||||
if (unsig) return Poco::Data::MetaColumn::FDT_UINT32;
|
if (unsig) return Poco::Data::MetaColumn::FDT_UINT32;
|
||||||
return Poco::Data::MetaColumn::FDT_INT32;
|
return Poco::Data::MetaColumn::FDT_INT32;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// StreamUtil.h
|
// StreamUtil.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.3/Foundation/include/Poco/StreamUtil.h#1 $
|
// $Id: //poco/1.3/Foundation/include/Poco/StreamUtil.h#2 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Streams
|
// Package: Streams
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
// poco_ios_init
|
// poco_ios_init
|
||||||
//
|
//
|
||||||
// This is a workaround for a bug in the Microsoft
|
// This is a workaround for a bug in the Dinkumware
|
||||||
// implementation of iostreams.
|
// implementation of iostreams.
|
||||||
//
|
//
|
||||||
// Calling basic_ios::init() multiple times for the
|
// Calling basic_ios::init() multiple times for the
|
||||||
@@ -90,11 +90,24 @@
|
|||||||
// Some stream implementations, however, require that
|
// Some stream implementations, however, require that
|
||||||
// init() is called in the MyIOS constructor.
|
// init() is called in the MyIOS constructor.
|
||||||
// Therefore we replace each call to init() with
|
// Therefore we replace each call to init() with
|
||||||
// the following macro:
|
// the poco_ios_init macro defined below.
|
||||||
#if defined(_MSC_VER) && (!defined(_STLP_MSVC) || defined(_STLP_NO_OWN_IOSTREAMS))
|
|
||||||
#define poco_ios_init(buf)
|
|
||||||
|
#if !defined(POCO_IOS_INIT_HACK)
|
||||||
|
// Microsoft Visual Studio with Dinkumware STL (but not STLport)
|
||||||
|
# if defined(_MSC_VER) && (!defined(_STLP_MSVC) || defined(_STLP_NO_OWN_IOSTREAMS))
|
||||||
|
# define POCO_IOS_INIT_HACK 1
|
||||||
|
// QNX with Dinkumware but not GNU C++ Library
|
||||||
|
# elif defined(__QNX__) && !defined(__GLIBCPP__)
|
||||||
|
# define POCO_IOS_INIT_HACK 1
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(POCO_IOS_INIT_HACK)
|
||||||
|
# define poco_ios_init(buf)
|
||||||
#else
|
#else
|
||||||
#define poco_ios_init(buf) init(buf)
|
# define poco_ios_init(buf) init(buf)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// AttributesImpl.h
|
// AttributesImpl.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.3/XML/include/Poco/SAX/AttributesImpl.h#2 $
|
// $Id: //poco/1.3/XML/include/Poco/SAX/AttributesImpl.h#3 $
|
||||||
//
|
//
|
||||||
// Library: XML
|
// Library: XML
|
||||||
// Package: SAX
|
// Package: SAX
|
||||||
@@ -212,21 +212,21 @@ inline int AttributesImpl::getLength() const
|
|||||||
|
|
||||||
inline const XMLString& AttributesImpl::getLocalName(int i) const
|
inline const XMLString& AttributesImpl::getLocalName(int i) const
|
||||||
{
|
{
|
||||||
poco_assert (i < _attributes.size());
|
poco_assert (0 <= i && i < static_cast<int>(_attributes.size()));
|
||||||
return _attributes[i].localName;
|
return _attributes[i].localName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline const XMLString& AttributesImpl::getQName(int i) const
|
inline const XMLString& AttributesImpl::getQName(int i) const
|
||||||
{
|
{
|
||||||
poco_assert (i < _attributes.size());
|
poco_assert (0 <= i && i < static_cast<int>(_attributes.size()));
|
||||||
return _attributes[i].qname;
|
return _attributes[i].qname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline const XMLString& AttributesImpl::getType(int i) const
|
inline const XMLString& AttributesImpl::getType(int i) const
|
||||||
{
|
{
|
||||||
poco_assert (i < _attributes.size());
|
poco_assert (0 <= i && i < static_cast<int>(_attributes.size()));
|
||||||
return _attributes[i].type;
|
return _attributes[i].type;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,7 +253,7 @@ inline const XMLString& AttributesImpl::getType(const XMLString& namespaceURI, c
|
|||||||
|
|
||||||
inline const XMLString& AttributesImpl::getValue(int i) const
|
inline const XMLString& AttributesImpl::getValue(int i) const
|
||||||
{
|
{
|
||||||
poco_assert (i < _attributes.size());
|
poco_assert (0 <= i && i < static_cast<int>(_attributes.size()));
|
||||||
return _attributes[i].value;
|
return _attributes[i].value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -280,14 +280,14 @@ inline const XMLString& AttributesImpl::getValue(const XMLString& namespaceURI,
|
|||||||
|
|
||||||
inline const XMLString& AttributesImpl::getURI(int i) const
|
inline const XMLString& AttributesImpl::getURI(int i) const
|
||||||
{
|
{
|
||||||
poco_assert (i < _attributes.size());
|
poco_assert (0 <= i && i < static_cast<int>(_attributes.size()));
|
||||||
return _attributes[i].namespaceURI;
|
return _attributes[i].namespaceURI;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool AttributesImpl::isSpecified(int i) const
|
inline bool AttributesImpl::isSpecified(int i) const
|
||||||
{
|
{
|
||||||
poco_assert (i < _attributes.size());
|
poco_assert (0 <= i && i < static_cast<int>(_attributes.size()));
|
||||||
return _attributes[i].specified;
|
return _attributes[i].specified;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// AttributesImpl.cpp
|
// AttributesImpl.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.3/XML/src/AttributesImpl.cpp#3 $
|
// $Id: //poco/1.3/XML/src/AttributesImpl.cpp#4 $
|
||||||
//
|
//
|
||||||
// Library: XML
|
// Library: XML
|
||||||
// Package: SAX
|
// Package: SAX
|
||||||
@@ -106,7 +106,7 @@ int AttributesImpl::getIndex(const XMLString& namespaceURI, const XMLString& loc
|
|||||||
|
|
||||||
void AttributesImpl::setValue(int i, const XMLString& value)
|
void AttributesImpl::setValue(int i, const XMLString& value)
|
||||||
{
|
{
|
||||||
poco_assert (i < _attributes.size());
|
poco_assert (0 <= i && i < static_cast<int>(_attributes.size()));
|
||||||
_attributes[i].value = value;
|
_attributes[i].value = value;
|
||||||
_attributes[i].specified = true;
|
_attributes[i].specified = true;
|
||||||
}
|
}
|
||||||
@@ -151,7 +151,7 @@ void AttributesImpl::setAttributes(const Attributes& attributes)
|
|||||||
|
|
||||||
void AttributesImpl::setAttribute(int i, const XMLString& namespaceURI, const XMLString& localName, const XMLString& qname, const XMLString& type, const XMLString& value)
|
void AttributesImpl::setAttribute(int i, const XMLString& namespaceURI, const XMLString& localName, const XMLString& qname, const XMLString& type, const XMLString& value)
|
||||||
{
|
{
|
||||||
poco_assert (i < _attributes.size());
|
poco_assert (0 <= i && i < static_cast<int>(_attributes.size()));
|
||||||
_attributes[i].namespaceURI = namespaceURI;
|
_attributes[i].namespaceURI = namespaceURI;
|
||||||
_attributes[i].localName = localName;
|
_attributes[i].localName = localName;
|
||||||
_attributes[i].qname = qname;
|
_attributes[i].qname = qname;
|
||||||
@@ -251,28 +251,28 @@ void AttributesImpl::reserve(std::size_t capacity)
|
|||||||
|
|
||||||
void AttributesImpl::setLocalName(int i, const XMLString& localName)
|
void AttributesImpl::setLocalName(int i, const XMLString& localName)
|
||||||
{
|
{
|
||||||
poco_assert (i < _attributes.size());
|
poco_assert (0 <= i && i < static_cast<int>(_attributes.size()));
|
||||||
_attributes[i].localName = localName;
|
_attributes[i].localName = localName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AttributesImpl::setQName(int i, const XMLString& qname)
|
void AttributesImpl::setQName(int i, const XMLString& qname)
|
||||||
{
|
{
|
||||||
poco_assert (i < _attributes.size());
|
poco_assert (0 <= i && i < static_cast<int>(_attributes.size()));
|
||||||
_attributes[i].qname = qname;
|
_attributes[i].qname = qname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AttributesImpl::setType(int i, const XMLString& type)
|
void AttributesImpl::setType(int i, const XMLString& type)
|
||||||
{
|
{
|
||||||
poco_assert (i < _attributes.size());
|
poco_assert (0 <= i && i < static_cast<int>(_attributes.size()));
|
||||||
_attributes[i].type = type;
|
_attributes[i].type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AttributesImpl::setURI(int i, const XMLString& namespaceURI)
|
void AttributesImpl::setURI(int i, const XMLString& namespaceURI)
|
||||||
{
|
{
|
||||||
poco_assert (i < _attributes.size());
|
poco_assert (0 <= i && i < static_cast<int>(_attributes.size()));
|
||||||
_attributes[i].namespaceURI = namespaceURI;
|
_attributes[i].namespaceURI = namespaceURI;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user