11/* 
22 *  R : A Computer Language for Statistical Data Analysis 
3-  *  Copyright (C) 1997--2024   The R Core Team 
3+  *  Copyright (C) 1997--2025   The R Core Team 
44 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka 
55 * 
66 *  This program is free software; you can redistribute it and/or modify 
@@ -2967,7 +2967,7 @@ attribute_hidden SEXP do_regexpr(SEXP call, SEXP op, SEXP args, SEXP env)
29672967    regex_t  reg ;
29682968    regmatch_t  regmatch [10 ];
29692969    R_xlen_t  i , n ;
2970-     int  rc , igcase_opt , perl_opt , fixed_opt , useBytes ;
2970+     Rboolean  rc , igcase_opt , perl_opt , fixed_opt , useBytes ;
29712971    const  char  * spat  =  NULL ; /* -Wall */ 
29722972    const  wchar_t  * wpat  =  NULL ;
29732973    const  char  * s  =  NULL ;
@@ -2994,14 +2994,10 @@ attribute_hidden SEXP do_regexpr(SEXP call, SEXP op, SEXP args, SEXP env)
29942994    checkArity (op , args );
29952995    pat  =  CAR (args ); args  =  CDR (args );
29962996    text  =  CAR (args ); args  =  CDR (args );
2997-     igcase_opt  =  asLogical (CAR (args )); args  =  CDR (args );
2998-     perl_opt  =  asLogical (CAR (args )); args  =  CDR (args );
2999-     fixed_opt  =  asLogical (CAR (args )); args  =  CDR (args );
3000-     useBytes  =  asLogical (CAR (args )); args  =  CDR (args );
3001-     if  (igcase_opt  ==  NA_INTEGER ) igcase_opt  =  0 ;
3002-     if  (perl_opt  ==  NA_INTEGER ) perl_opt  =  0 ;
3003-     if  (fixed_opt  ==  NA_INTEGER ) fixed_opt  =  0 ;
3004-     if  (useBytes  ==  NA_INTEGER ) useBytes  =  0 ;
2997+     igcase_opt  =  asRbool (CAR (args ), call ); args  =  CDR (args );
2998+     perl_opt  =  asRbool (CAR (args ), call ); args  =  CDR (args );
2999+     fixed_opt  =  asRbool (CAR (args ), call ); args  =  CDR (args );
3000+     useBytes  =  asRbool (CAR (args ), call ); args  =  CDR (args );
30053001    if  (fixed_opt  &&  igcase_opt )
30063002	warning (_ ("argument '%s' will be ignored" ), "ignore.case = TRUE" );
30073003    if  (fixed_opt  &&  perl_opt ) {
0 commit comments