[Rprotobuf-commits] r711 - pkg/src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Jan 4 10:07:18 CET 2014
Author: murray
Date: 2014-01-04 10:07:18 +0100 (Sat, 04 Jan 2014)
New Revision: 711
Modified:
pkg/src/rprotobuf.cpp
pkg/src/rprotobuf.h
Log:
Remove two unused macros and make a method parameter const. Suggested
by Flexelint.
Modified: pkg/src/rprotobuf.cpp
===================================================================
--- pkg/src/rprotobuf.cpp 2014-01-04 03:11:46 UTC (rev 710)
+++ pkg/src/rprotobuf.cpp 2014-01-04 09:07:18 UTC (rev 711)
@@ -213,7 +213,7 @@
return _TRUE_;
}
-GPB::FieldDescriptor* getFieldDescriptor(GPB::Message* message, SEXP name) {
+RcppExport GPB::FieldDescriptor* getFieldDescriptor(const GPB::Message* message, SEXP name) {
GPB::FieldDescriptor* field_desc = (GPB::FieldDescriptor*)0;
BEGIN_RCPP
const GPB::Descriptor* desc = message->GetDescriptor();
Modified: pkg/src/rprotobuf.h
===================================================================
--- pkg/src/rprotobuf.h 2014-01-04 03:11:46 UTC (rev 710)
+++ pkg/src/rprotobuf.h 2014-01-04 09:07:18 UTC (rev 711)
@@ -75,7 +75,7 @@
#endif
-#define FIN_DBG(ptr, CLAZZ)
+// #define FIN_DBG(ptr, CLAZZ)
// #define FIN_DBG(ptr, CLAZZ) Rprintf( "RProtoBuf finalizing %s (%p)\n", CLAZZ,
// ptr )
@@ -111,8 +111,6 @@
#define GET_ENUM_VALUE_DESCRIPTOR_POINTER_FROM_S4(m) \
(GPB::EnumValueDescriptor*) EXTPTR_PTR(GET_SLOT(m, Rf_install("pointer")))
-#define GET_METHOD(xp) (GPB::MethodDescriptor*) EXTPTR_PTR(xp)
-
#define COPYSTRING(s) s
#define THROW_SOCKET_ERROR(message) Rf_error("%s : %s", message, strerror(sockerrno))
@@ -138,7 +136,7 @@
RcppExport SEXP getExtensionDescriptor(SEXP);
RcppExport SEXP readProtoFiles(SEXP, SEXP);
RcppExport Rboolean isMessage(SEXP, const char*);
-RcppExport GPB::FieldDescriptor* getFieldDescriptor(GPB::Message*, SEXP);
+RcppExport GPB::FieldDescriptor* getFieldDescriptor(const GPB::Message*, SEXP);
/* in extractors.cpp */
RcppExport SEXP getMessageField(SEXP, SEXP);
More information about the Rprotobuf-commits
mailing list