You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2013/02/15 21:26:15 UTC

svn commit: r1446757 - in /qpid/proton/trunk/proton-c: include/proton/codec.h src/codec/codec.c

Author: rhs
Date: Fri Feb 15 20:26:14 2013
New Revision: 1446757

URL: http://svn.apache.org/r1446757
Log:
PROTON-167: added const char *pn_type_name(pn_type_t type) to codec.h

Modified:
    qpid/proton/trunk/proton-c/include/proton/codec.h
    qpid/proton/trunk/proton-c/src/codec/codec.c

Modified: qpid/proton/trunk/proton-c/include/proton/codec.h
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/include/proton/codec.h?rev=1446757&r1=1446756&r2=1446757&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/include/proton/codec.h (original)
+++ qpid/proton/trunk/proton-c/include/proton/codec.h Fri Feb 15 20:26:14 2013
@@ -64,6 +64,8 @@ typedef enum {
   PN_MAP
 } pn_type_t;
 
+PN_EXTERN const char *pn_type_name(pn_type_t type);
+
 typedef struct {
   pn_type_t type;
   union {

Modified: qpid/proton/trunk/proton-c/src/codec/codec.c
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/codec/codec.c?rev=1446757&r1=1446756&r2=1446757&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/codec/codec.c (original)
+++ qpid/proton/trunk/proton-c/src/codec/codec.c Fri Feb 15 20:26:14 2013
@@ -72,7 +72,6 @@ int pn_decode_atoms(pn_bytes_t *bytes, p
 int pn_decode_one(pn_bytes_t *bytes, pn_atoms_t *atoms);
 
 int pn_print_atom(pn_iatom_t atom);
-const char *pn_type_str(pn_type_t type);
 int pn_print_atoms(const pn_atoms_t *atoms);
 ssize_t pn_format_atoms(char *buf, size_t n, pn_atoms_t atoms);
 int pn_format_atom(pn_bytes_t *bytes, pn_iatom_t atom);
@@ -85,7 +84,7 @@ typedef union {
   double d;
 } conv_t;
 
-const char *pn_type_str(pn_type_t type)
+const char *pn_type_name(pn_type_t type)
 {
   if (type == PN_TYPE) return "PN_TYPE";
 
@@ -162,7 +161,7 @@ int pn_print_atom(pn_iatom_t atom)
 int pn_format_atom(pn_bytes_t *bytes, pn_iatom_t atom)
 {
   if (atom.type == PN_TYPE) {
-    return pn_bytes_format(bytes, "%s", pn_type_str(atom.u.type));
+    return pn_bytes_format(bytes, "%s", pn_type_name(atom.u.type));
   }
 
   switch (atom.type)



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org