translateChar in NewName in bind.c

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

translateChar in NewName in bind.c

R devel mailing list
In function 'NewName' in bind.c (https://svn.r-project.org/R/trunk/src/main/bind.c), in
else if (*CHAR(base)) ,
'translateChar' is used. Should it be 'translateCharUTF8' instead? The end result is marked as UTF-8:
mkCharCE(cbuf, CE_UTF8)
Other cases already use 'translateCharUTF8'.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: translateChar in NewName in bind.c

R devel mailing list
I see another thing in function 'NewName' in bind.c. In
else if (*CHAR(tag)) ,
'ans' is basically copied from 'tag'. Could the whole thing there be just the following?
ans = tag;
It seems to me that it can also replace
ans = R_BlankString;
in 'else'; so,
else if (*CHAR(tag))
and
else
can be merged to be just
else .

--------------------------------------------


 Subject: translateChar in NewName in bind.c
 To: [hidden email]
 Date: Saturday, 10 June, 2017, 9:14 PM
 
 In function 'NewName' in bind.c (https://svn.r-project.org/R/trunk/src/main/bind.c), in
 else if (*CHAR(base)) ,
 'translateChar' is used. Should it be
 'translateCharUTF8' instead? The end result is marked as
 UTF-8:
 mkCharCE(cbuf, CE_UTF8)
 Other cases already use
 'translateCharUTF8'.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: translateChar in NewName in bind.c

Tomas Kalibera
Thanks, fixed in R-devel.
Best
Tomas

On 06/11/2017 02:30 PM, Suharto Anggono Suharto Anggono via R-devel wrote:

> I see another thing in function 'NewName' in bind.c. In
> else if (*CHAR(tag)) ,
> 'ans' is basically copied from 'tag'. Could the whole thing there be just the following?
> ans = tag;
> It seems to me that it can also replace
> ans = R_BlankString;
> in 'else'; so,
> else if (*CHAR(tag))
> and
> else
> can be merged to be just
> else .
>
> --------------------------------------------
>
>
>   Subject: translateChar in NewName in bind.c
>   To: [hidden email]
>   Date: Saturday, 10 June, 2017, 9:14 PM
>  
>   In function 'NewName' in bind.c (https://svn.r-project.org/R/trunk/src/main/bind.c), in
>   else if (*CHAR(base)) ,
>   'translateChar' is used. Should it be
>   'translateCharUTF8' instead? The end result is marked as
>   UTF-8:
>   mkCharCE(cbuf, CE_UTF8)
>   Other cases already use
>   'translateCharUTF8'.
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel