certi-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[certi-cvs] certi/libCERTI MessageBuffer.hh


From: certi-cvs
Subject: [certi-cvs] certi/libCERTI MessageBuffer.hh
Date: Tue, 24 Nov 2009 16:45:56 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     Eric NOULARD <erk>      09/11/24 16:45:56

Modified files:
        libCERTI       : MessageBuffer.hh 

Log message:
        Check-in clean-up patch from Mathias
        patch #6998: Fix a preprocessor warning

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/MessageBuffer.hh?cvsroot=certi&r1=3.7&r2=3.8

Patches:
Index: MessageBuffer.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/MessageBuffer.hh,v
retrieving revision 3.7
retrieving revision 3.8
diff -u -b -r3.7 -r3.8
--- MessageBuffer.hh    26 Apr 2008 14:59:40 -0000      3.7
+++ MessageBuffer.hh    24 Nov 2009 16:45:56 -0000      3.8
@@ -157,19 +157,27 @@
        return read_u##type##s(reinterpret_cast<u##type##_t*>(data),n); \
 }                                                      \
 
+
 #define DECLARE_SINGLE_READ_WRITE(type,suffix)     \
+DECLARE_SINGLE_READ_WRITE_(type,type##suffix)
+
+#define DECLARE_SINGLE_READ_WRITE2(type)     \
+DECLARE_SINGLE_READ_WRITE_(type,type)
+
+
+#define DECLARE_SINGLE_READ_WRITE_(type,datatype)     \
        int32_t                                         \
-       write_##type(const type##suffix data) {         \
+       write_##type(const datatype data) {             \
        return write_##type##s(&data,1);        \
 }                                                      \
 \
 int32_t                                                \
-read_##type(type##suffix* data) {              \
+read_##type(datatype* data) {          \
        return read_##type##s(data,1);  \
 }                                    \
 \
-type##suffix read_##type() {\
-       type##suffix retval;     \
+datatype read_##type() {\
+       datatype retval;     \
        read_##type##s(&retval,1);\
        return retval; \
 } 
@@ -194,7 +202,7 @@
        read_chars(char* data, uint32_t n) {
                return read_uint8s(reinterpret_cast<uint8_t*>(data),n);
        }
-       DECLARE_SINGLE_READ_WRITE(char,)
+       DECLARE_SINGLE_READ_WRITE2(char)
 
 #define write_bytes  write_chars
 #define read_bytes   read_chars
@@ -234,14 +242,14 @@
        int32_t
        read_floats(float* data, uint32_t n);
 
-       DECLARE_SINGLE_READ_WRITE(float,)
+       DECLARE_SINGLE_READ_WRITE2(float)
 
        int32_t
        write_doubles(const double* data, uint32_t n);
        int32_t
        read_doubles(double* data, uint32_t n);
 
-       DECLARE_SINGLE_READ_WRITE(double,)
+       DECLARE_SINGLE_READ_WRITE2(double)
 
        int32_t
        write_string(const std::string& str);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]