[Rprotobuf-commits] r419 - in pkg: . src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Apr 10 19:48:32 CEST 2011


Author: edd
Date: 2011-04-10 19:48:32 +0200 (Sun, 10 Apr 2011)
New Revision: 419

Modified:
   pkg/ChangeLog
   pkg/src/extractors.cpp
   pkg/src/mutators.cpp
   pkg/src/wrapper_FieldDescriptor.cpp
Log:
protect (U)INT64 in #iddef RCPP_HAS_LONG_LONG


Modified: pkg/ChangeLog
===================================================================
--- pkg/ChangeLog	2011-04-10 17:30:59 UTC (rev 418)
+++ pkg/ChangeLog	2011-04-10 17:48:32 UTC (rev 419)
@@ -1,3 +1,10 @@
+2011-04-10  Dirk Eddelbuettel  <edd at dexter>
+
+	* src/extractors.cpp: Protect UINT64 and INT64 inside of #ifdef test
+	for RCPP_HAS_LONG_LONG_TYPES which we now need for g++ 4.5 or later
+	* src/mutators.cpp: Idem
+	* wrapper_FieldDescriptor.cpp: Idem
+
 2011-04-08  Dirk Eddelbuettel  <edd at debian.org>
 
 	* DESCRIPTION: Release 0.2.3

Modified: pkg/src/extractors.cpp
===================================================================
--- pkg/src/extractors.cpp	2011-04-10 17:30:59 UTC (rev 418)
+++ pkg/src/extractors.cpp	2011-04-10 17:48:32 UTC (rev 419)
@@ -1,7 +1,7 @@
 // -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
 /* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
 //
-// Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois
+// Copyright (C) 2010 - 2011  Dirk Eddelbuettel and Romain Francois
 //
 // This file is part of RProtoBuf.
 //
@@ -72,9 +72,13 @@
 			return Rcpp::wrap( RepeatedFieldImporter<DATATYPE>(ref, *message, fieldDesc) ) ; \
 
 			HANDLE_REPEATED_FIELD(CPPTYPE_INT32, GPB::int32) ;
+#ifdef RCPP_HAS_LONG_LONG_TYPES
     		HANDLE_REPEATED_FIELD(CPPTYPE_INT64, GPB::int64) ;
+#endif
     		HANDLE_REPEATED_FIELD(CPPTYPE_UINT32 , GPB::uint32) ;
+#ifdef RCPP_HAS_LONG_LONG_TYPES
     		HANDLE_REPEATED_FIELD(CPPTYPE_UINT64 , GPB::uint64) ;
+#endif
     		HANDLE_REPEATED_FIELD(CPPTYPE_DOUBLE, double) ;
     		HANDLE_REPEATED_FIELD(CPPTYPE_FLOAT, float) ;
     		HANDLE_REPEATED_FIELD(CPPTYPE_BOOL, bool) ;
@@ -109,9 +113,13 @@
 			return Rcpp::wrap( ref->Get##SUFFIX(*message, fieldDesc ) ) ;
 
 		HANDLE_SINGLE_FIELD( CPPTYPE_INT32,  Int32 ); 
+#ifdef RCPP_HAS_LONG_LONG_TYPES
 		HANDLE_SINGLE_FIELD( CPPTYPE_INT64,  Int64 );
+#endif
 		HANDLE_SINGLE_FIELD( CPPTYPE_UINT32, UInt32 ); 
+#ifdef RCPP_HAS_LONG_LONG_TYPES
 		HANDLE_SINGLE_FIELD( CPPTYPE_UINT64, UInt64 );
+#endif
 		HANDLE_SINGLE_FIELD( CPPTYPE_DOUBLE, Double );
 		HANDLE_SINGLE_FIELD( CPPTYPE_FLOAT, Float );
 		HANDLE_SINGLE_FIELD( CPPTYPE_BOOL, Bool );

Modified: pkg/src/mutators.cpp
===================================================================
--- pkg/src/mutators.cpp	2011-04-10 17:30:59 UTC (rev 418)
+++ pkg/src/mutators.cpp	2011-04-10 17:48:32 UTC (rev 419)
@@ -1,3 +1,23 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+/* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
+//
+// Copyright (C) 2010 - 2011  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of RProtoBuf.
+//
+// RProtoBuf is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// RProtoBuf is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with RProtoBuf.  If not, see <http://www.gnu.org/licenses/>.
+
 #include "rprotobuf.h" 
 #include "fieldtypes.h" 
 /* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
@@ -970,9 +990,13 @@
 		break ;   															\
 	}
 HANDLE_SINGLE_FIELD( CPPTYPE_INT32, Int32, GPB::int32) ;
+#ifdef RCPP_HAS_LONG_LONG_TYPES
 HANDLE_SINGLE_FIELD( CPPTYPE_INT64, Int64, GPB::int64) ;
+#endif
 HANDLE_SINGLE_FIELD( CPPTYPE_UINT32, UInt32, GPB::uint32) ;
+#ifdef RCPP_HAS_LONG_LONG_TYPES
 HANDLE_SINGLE_FIELD( CPPTYPE_UINT64, UInt64, GPB::uint64) ;
+#endif
 HANDLE_SINGLE_FIELD( CPPTYPE_DOUBLE, Double, double) ;
 HANDLE_SINGLE_FIELD( CPPTYPE_FLOAT, Float, float) ;
 HANDLE_SINGLE_FIELD( CPPTYPE_BOOL, Bool, bool) ;

Modified: pkg/src/wrapper_FieldDescriptor.cpp
===================================================================
--- pkg/src/wrapper_FieldDescriptor.cpp	2011-04-10 17:30:59 UTC (rev 418)
+++ pkg/src/wrapper_FieldDescriptor.cpp	2011-04-10 17:48:32 UTC (rev 419)
@@ -1,3 +1,23 @@
+// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 4 -*-
+/* :tabSize=4:indentSize=4:noTabs=false:folding=explicit:collapseFolds=1: */
+//
+// Copyright (C) 2010 - 2011  Dirk Eddelbuettel and Romain Francois
+//
+// This file is part of RProtoBuf.
+//
+// RProtoBuf is free software: you can redistribute it and/or modify it
+// under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// RProtoBuf is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with RProtoBuf.  If not, see <http://www.gnu.org/licenses/>.
+
 #include "rprotobuf.h"
 #include "fieldtypes.h"
 
@@ -32,9 +52,13 @@
 		switch( d->cpp_type() ){
 			
 			RPB_HANDLE_CASE(INT32,int32)
+#ifdef RCPP_HAS_LONG_LONG_TYPES
 			RPB_HANDLE_CASE(INT64,int64)
+#endif
 			RPB_HANDLE_CASE(UINT32,uint32)
+#ifdef RCPP_HAS_LONG_LONG_TYPES
 			RPB_HANDLE_CASE(UINT64,uint64)
+#endif
 			RPB_HANDLE_CASE(DOUBLE,double)
 			RPB_HANDLE_CASE(FLOAT,float)
 			RPB_HANDLE_CASE(BOOL,bool)



More information about the Rprotobuf-commits mailing list