You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2008/07/22 06:21:19 UTC

svn commit: r678632 - in /xalan/c/trunk/src/xalanc/PlatformSupport: DOMStringHelper.cpp DOMStringHelper.hpp

Author: dbertoni
Date: Mon Jul 21 21:21:18 2008
New Revision: 678632

URL: http://svn.apache.org/viewvc?rev=678632&view=rev
Log:
Fixed broken cast.

Modified:
    xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp
    xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.hpp

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp?rev=678632&r1=678631&r2=678632&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp Mon Jul 21 21:21:18 2008
@@ -1392,7 +1392,7 @@
 	}
 	else if (static_cast<XALAN_INT64>(theValue) == theValue)
 	{
-		NumberToCharacters(long(theValue), formatterListener, function);
+		NumberToCharacters(static_cast<XALAN_INT64>(theValue), formatterListener, function);
 	}
 	else
 	{
@@ -1625,24 +1625,22 @@
 }
 
 
-#if 0
-XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString&)
-LongToDOMString(
-			long				theValue,
-			XalanDOMString&		theResult)
+
+void
+DOMStringHelper::NumberToCharacters(
+			XALAN_INT64		theValue,
+			FormatterListener&	formatterListener,
+			MemberFunctionPtr	function)
 {
-	return ScalarToDecimalString(theValue, theResult);
-}
+	XalanDOMChar	theBuffer[MAX_PRINTF_DIGITS + 1];
 
+	const XalanDOMChar* const	theResult =
+        ScalarToDecimalString(
+            theValue,
+            &theBuffer[MAX_PRINTF_DIGITS]);
 
-XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(XalanDOMString&)
-UnsignedLongToDOMString(
-			unsigned long		theValue,
-			XalanDOMString&		theResult)
-{
-	return ScalarToDecimalString(theValue, theResult);
+	(formatterListener.*function)(theResult, XalanDOMString::length(theResult));
 }
-#endif
 
 
 

Modified: xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.hpp?rev=678632&r1=678631&r2=678632&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.hpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.hpp Mon Jul 21 21:21:18 2008
@@ -708,6 +708,12 @@
             long                theValue,
             FormatterListener&  formatterListener,
             MemberFunctionPtr   function);
+
+    static void
+    NumberToCharacters(
+            XALAN_INT64         theValue,
+            FormatterListener&  formatterListener,
+            MemberFunctionPtr   function);
 };
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org