activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r503418 - /activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppMarshallingClassesGenerator.java
Date Sun, 04 Feb 2007 14:50:17 GMT
Author: tabish
Date: Sun Feb  4 06:50:17 2007
New Revision: 503418

URL: http://svn.apache.org/viewvc?view=rev&rev=503418
Log:
http://issues.apache.org/activemq/browse/AMQCPP-30

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppMarshallingClassesGenerator.java

Modified: activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppMarshallingClassesGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppMarshallingClassesGenerator.java?view=diff&rev=503418&r1=503417&r2=503418
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppMarshallingClassesGenerator.java
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/openwire-scripts/AmqCppMarshallingClassesGenerator.java
Sun Feb  4 06:50:17 2007
@@ -232,12 +232,12 @@
             }
             else if (type.equals("byte[]") || type.equals("ByteSequence")) {
                 if (size != null) {
-                    out.println("    dataOut->write( &" + getter + "[0], " + size.asInt()
+ " );");
+                    out.println("    dataOut->write( (const unsigned char*)(&" + getter
+ "[0]), " + size.asInt() + " );");
                 }
                 else {
                     out.println("    if( bs->readBoolean() ) {");
-                    out.println("        dataOut->write( " + getter + ".size() );");
-                    out.println("        dataOut->write( &" + getter + "[0], " + getter
+ ".size() );");
+                    out.println("        dataOut->write( (int)" + getter + ".size() );");
+                    out.println("        dataOut->write( (const unsigned char*)(&"
+ getter + "[0]), (int)" + getter + ".size() );");
                     out.println("    }");
                 }
             }
@@ -383,13 +383,13 @@
             }
             else if( type.equals("byte[]") || type.equals("ByteSequence") ) {
                 if(size != null) {
-                    out.println("    dataOut->write( &" + getter + "[0], " + size.asInt()
+ " );");
+                    out.println("    dataOut->write( (const unsigned char*)(&" + getter
+ "[0]), (int)" + size.asInt() + " );");
                 }
                 else {
                     out.println("    dataOut->write( " + getter + ".size() != 0 );");
                     out.println("    if( " + getter + ".size() != 0 ) {");
-                    out.println("        dataOut->write( " + getter + ".size() );");
-                    out.println("        dataOut->write( &" + getter + "[0], " + getter
+ ".size() );");
+                    out.println("        dataOut->write( (int)" + getter + ".size() );");
+                    out.println("        dataOut->write( (const unsigned char*)(&"
+ getter + "[0]), (int)" + getter + ".size() );");
                     out.println("    }");
                 }
             }



Mime
View raw message