[SCM] OCE packaging branch, upstream, updated. OCE-0.6.0-230-g17bea23
tpaviot
tpaviot at gmail.com
Fri Feb 24 18:50:19 UTC 2012
The following commit has been merged in the upstream branch:
commit a60844d693e21f0aafae5e5b8eddd2d3c0842e0f
Author: tpaviot <tpaviot at gmail.com>
Date: Thu Jan 12 18:10:26 2012 +0100
Bugfix: std::streamsize replacement for int in std::streambuf::xsputn overload
Patch contributed by Simon Floery. Message posted to oce-dev:
"""
I was trying OpenCascade's XML parser (LDOM*) the other day and stumbled
across a bug that appears at least on recent Ubuntu systems (depends on how
the platform defines std::streamsize). In src/LDOM/LDOM_OSStream.hxx,
LDOM_SBuffer::xsputn is declared with int arguments to overload
std::streambuf::xsputn, however std::streamsize arguments would be correct
(cf. http://www.cplusplus.com/reference/iostream/streambuf/xsputn/).
"""
diff --git a/inc/LDOM_OSStream.hxx b/inc/LDOM_OSStream.hxx
index 14ae754..3f56200 100644
--- a/inc/LDOM_OSStream.hxx
+++ b/inc/LDOM_OSStream.hxx
@@ -59,7 +59,7 @@ class LDOM_SBuffer : public streambuf
Standard_EXPORT virtual int underflow();
//virtual int uflow();
- Standard_EXPORT virtual int xsputn(const char* s, int n);
+ Standard_EXPORT virtual int xsputn(const char* s, std::streamsize n);
//virtual int xsgetn(char* s, int n);
//virtual int sync();
diff --git a/src/LDOM/LDOM_OSStream.cxx b/src/LDOM/LDOM_OSStream.cxx
index 6ba64a0..d3ebcd2 100644
--- a/src/LDOM/LDOM_OSStream.cxx
+++ b/src/LDOM/LDOM_OSStream.cxx
@@ -111,7 +111,7 @@ int LDOM_SBuffer::underflow()
//function : xsputn()
//purpose : redefined virtual
//=======================================================================
-int LDOM_SBuffer::xsputn(const char* aStr, int n)
+int LDOM_SBuffer::xsputn(const char* aStr, std::streamsize n)
{
int aLen = n + 1;
int freeLen = myMaxBuf - myCurString->len - 1;
--
OCE packaging
More information about the debian-science-commits
mailing list