[Rprotobuf-commits] r374 - in pkg: man src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Aug 12 22:32:32 CEST 2010


Author: romain
Date: 2010-08-12 22:32:31 +0200 (Thu, 12 Aug 2010)
New Revision: 374

Modified:
   pkg/man/read.Rd
   pkg/src/S4_classes.h
   pkg/src/wrapper_Descriptor.cpp
Log:
gotcha

Modified: pkg/man/read.Rd
===================================================================
--- pkg/man/read.Rd	2010-08-12 20:31:52 UTC (rev 373)
+++ pkg/man/read.Rd	2010-08-12 20:32:31 UTC (rev 374)
@@ -42,9 +42,9 @@
 payload <- readBin( book, raw(0), 5000 )
 message3 <- tutorial.AddressBook$read( payload )
 
-% \dontshow{
-% stopifnot( identical( message, message2) )
-% stopifnot( identical( message, message3) )
-% }
+\dontshow{
+stopifnot( identical( message, message2) )
+stopifnot( identical( message, message3) )
+}
 
 }

Modified: pkg/src/S4_classes.h
===================================================================
--- pkg/src/S4_classes.h	2010-08-12 20:31:52 UTC (rev 373)
+++ pkg/src/S4_classes.h	2010-08-12 20:32:31 UTC (rev 374)
@@ -166,7 +166,6 @@
 				const_cast<GPB::Message*>(d), true) ;
 			slot( "type" ) = d->GetDescriptor()->full_name() ;
 		}
-		
 		S4_Message( const S4_Message& other) : S4(){
 			setSEXP( other.asSexp() );
 		}

Modified: pkg/src/wrapper_Descriptor.cpp
===================================================================
--- pkg/src/wrapper_Descriptor.cpp	2010-08-12 20:31:52 UTC (rev 373)
+++ pkg/src/wrapper_Descriptor.cpp	2010-08-12 20:32:31 UTC (rev 374)
@@ -145,8 +145,10 @@
 	if( !message ){
 		throw std::range_error( "could not call factory->GetPrototype(desc)->New()" ) ; 
 	}
+	message->ParsePartialFromCodedStream( &coded_stream) ;
 	
-	return( S4_Message( message ) ) ;
+	S4_Message res( message ) ;
+	return res ;
 }
 
 RCPP_FUNCTION_2( S4_Message, METHOD(readMessageFromRawVector), Rcpp::XPtr<GPB::Descriptor> desc, Rcpp::RawVector raw){



More information about the Rprotobuf-commits mailing list