activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r911176 - /activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/marshallers/AmqCppMarshallingClassesGenerator.java
Date Wed, 17 Feb 2010 21:11:03 GMT
Author: tabish
Date: Wed Feb 17 21:11:03 2010
New Revision: 911176

URL: http://svn.apache.org/viewvc?rev=911176&view=rev
Log:
Update for changes going into the Decaf io API.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/marshallers/AmqCppMarshallingClassesGenerator.java

Modified: activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/marshallers/AmqCppMarshallingClassesGenerator.java
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/marshallers/AmqCppMarshallingClassesGenerator.java?rev=911176&r1=911175&r2=911176&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/marshallers/AmqCppMarshallingClassesGenerator.java
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/marshallers/AmqCppMarshallingClassesGenerator.java
Wed Feb 17 21:11:03 2010
@@ -295,12 +295,12 @@
             }
             else if (type.equals("byte[]") || type.equals("ByteSequence")) {
                 if (size != null) {
-                    out.println("        dataOut->write( (const unsigned char*)(&"
+ getter + "[0]), 0, " + size.asInt() + " );");
+                    out.println("        dataOut->write( (const unsigned char*)(&"
+ getter + "[0]), " + size.asInt() + ", 0, " + size.asInt() + " );");
                 }
                 else {
                     out.println("        if( bs->readBoolean() ) {");
                     out.println("            dataOut->writeInt( (int)" + getter + ".size()
);");
-                    out.println("            dataOut->write( (const unsigned char*)(&"
+ getter + "[0]), 0, (int)" + getter + ".size() );");
+                    out.println("            dataOut->write( (const unsigned char*)(&"
+ getter + "[0]), " + getter + ".size(), 0, " + getter + ".size() );");
                     out.println("        }");
                 }
             }
@@ -461,13 +461,13 @@
             }
             else if( type.equals("byte[]") || type.equals("ByteSequence") ) {
                 if(size != null) {
-                    out.println("        dataOut->write( (const unsigned char*)(&"
+ getter + "[0]), 0, (int)" + size.asInt() + " );");
+                    out.println("        dataOut->write( (const unsigned char*)(&"
+ getter + "[0]), " + size.asInt() + ", 0, " + size.asInt() + " );");
                 }
                 else {
                     out.println("        dataOut->write( " + getter + ".size() != 0 );");
                     out.println("        if( " + getter + ".size() != 0 ) {");
                     out.println("            dataOut->writeInt( (int)" + getter + ".size()
);");
-                    out.println("            dataOut->write( (const unsigned char*)(&"
+ getter + "[0]), 0, (int)" + getter + ".size() );");
+                    out.println("            dataOut->write( (const unsigned char*)(&"
+ getter + "[0]), " + getter + ".size(), 0, " + getter + ".size() );");
                     out.println("        }");
                 }
             }



Mime
View raw message