Author: rhs
Date: Tue Apr 24 16:54:07 2012
New Revision: 1329847

URL: http://svn.apache.org/viewvc?rev=1329847&view=rev
Log:
switched argument order for pn_message_data

Modified:
    qpid/proton/trunk/proton-c/bindings/php/php.i
    qpid/proton/trunk/proton-c/bindings/php/tests.php

Modified: qpid/proton/trunk/proton-c/bindings/php/php.i
URL: 
http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/php/php.i?rev=1329847&r1=1329846&r2=1329847&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/php/php.i (original)
+++ qpid/proton/trunk/proton-c/bindings/php/php.i Tue Apr 24 16:54:07 2012
@@ -183,11 +183,11 @@ ssize_t pn_sasl_input(pn_sasl_t *sasl, c
 %ignore pn_sasl_output;
 
 %rename(pn_message_data) wrap_pn_message_data;
-// in PHP:  array = pn_message_data(MAXLEN, "binary message data");
+// in PHP:  array = pn_message_data("binary message data", MAXLEN);
 //          array[0] = size || error code
 //          array[1] = native string containing binary data
 %inline %{
-    void wrap_pn_message_data(size_t count, char *STRING, size_t LENGTH, char 
**OUTPUT_BUFFER, ssize_t *OUTPUT_LEN) {
+    void wrap_pn_message_data(char *STRING, size_t LENGTH, char 
**OUTPUT_BUFFER, ssize_t *OUTPUT_LEN, size_t count) {
         *OUTPUT_BUFFER = emalloc(sizeof(char) * count);
         *OUTPUT_LEN = pn_message_data(*OUTPUT_BUFFER, count, STRING, LENGTH );
     }

Modified: qpid/proton/trunk/proton-c/bindings/php/tests.php
URL: 
http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/php/tests.php?rev=1329847&r1=1329846&r2=1329847&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/php/tests.php (original)
+++ qpid/proton/trunk/proton-c/bindings/php/tests.php Tue Apr 24 16:54:07 2012
@@ -111,7 +111,7 @@ pn_connection_destroy($c2);
 // pn_message_data test
 //
 
-$x = pn_message_data(1024, "This is test data!");
+$x = pn_message_data("This is test data!", 1024);
 //print("Msg Len  = " . $x[0] . "\n");
 assert("$x[0] > 0");
 //print("Msg data = " . $x[1] . "\n");



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to