File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ Rcomplex Rf_ComplexFromReal(double, int*);
104104#undef  CALLED_FROM_DEFN_H
105105
106106Rboolean  Rf_asRbool (SEXP  x ,SEXP  call );
107+ bool  Rf_asBool2 (SEXP  x ,SEXP  call );
107108
108109
109110/* UUID identifying the internals version -- packages using compiled 
@@ -1730,6 +1731,7 @@ int R_NaN_is_R_NA(double);
17301731void  R_RestoreHashCount (SEXP  rho );
17311732
17321733# define  allocCharsxp 		Rf_allocCharsxp
1734+ # define  asBool2 	       	Rf_asBool2
17331735# define  asRbool 		Rf_asRbool
17341736# define  asVecSize 		Rf_asVecSize
17351737# define  asXLength 		Rf_asXLength
Original file line number Diff line number Diff line change @@ -1824,7 +1824,7 @@ int asLogical(SEXP x)
18241824    return  asLogical2 (x , /* checking = */  0 , R_NilValue );
18251825}
18261826
1827- // private version  
1827+ // private versions  
18281828Rboolean  asRbool (SEXP  x , SEXP  call )
18291829{
18301830    int  ans  =  asLogical2 (x , 1 , call );
@@ -1833,6 +1833,14 @@ Rboolean asRbool(SEXP x, SEXP call)
18331833    return  (Rboolean ) ans ;
18341834}
18351835
1836+ bool  asBool2 (SEXP  x , SEXP  call )
1837+ {
1838+     int  ans  =  asLogical2 (x , 1 , call );
1839+     if  (ans  ==  NA_LOGICAL )
1840+ 	errorcall (call , _ ("NA in coercion to Rboolean" ));
1841+     return  (bool ) ans ;
1842+ }
1843+ 
18361844// public version 
18371845Rboolean  asRboolean (SEXP  x )
18381846{
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments