[R-pkg-devel] [External] Use of ‘R_InputHandlers’

iuke-tier@ey m@iii@g oii uiow@@edu iuke-tier@ey m@iii@g oii uiow@@edu
Thu Jul 11 08:43:06 CEST 2024


On Wed, 10 Jul 2024, Duncan Murdoch wrote:

> An update to the rgl package was rejected with this note:
>
>> * checking compiled code ... NOTE
>> File ‘rgl/libs/rgl.so’:
>>   Found non-API call to R: ‘R_InputHandlers’
>> 
>> Compiled code should not call non-API entry points in R.
>> 
>> See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual,
>> and section ‘Moving into C API compliance’ for issues with the use of
>> non-API entry points.
>
> See 
> <https://win-builder.r-project.org/incoming_pretest/rgl_1.3.10_20240707_165632/Debian/00check.log> 
> for more info.
>
> `R_InputHandlers` isn't actually a function, it's a linked list of structures 
> holding input handlers.  rgl links into it to handle mouse and keyboard 
> interaction when it is displaying a window in X11.

Ideally the code generating the NOTE should be revised since a few of
the things checked for at that point are global variables, not entry
points.

Given the design of this interface this variable should be added to
the embedding API and dropped from the check list. I have not dropped
it from the check list in R-devel so you should no longer get this
NOTE.

Best,

luke

>
> `R_InputHandlers` is declared in R in src/include/R_ext/eventloop.h, where 
> comments state
>
>> /*
>>    For use by alternative front-ends and packages which need to share
>>    the R event loop (on Unix-alikes).
>>
>>    Not part of the API and subject to change without notice.
>>
>>    NB: HAVE_SYS_SELECT_H should be checked and defined before this is
>>    included.
>>  */
>
> WRE has a discussion of the issue in 8.1.4, "meshing event loops".  It refers 
> to comments in src/unix/sys-std.c, but I'm not sure which comments.
>
> rgl references it from this code:
>
> https://github.com/dmurdoch/rgl/blob/fbedc326e291c3ec28a9ccac7d030f04b05edfa3/src/x11lib.cpp#L53-L72
>
> Can anyone tell me whether I can fix this?
>
> Duncan Murdoch
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

-- 
Luke Tierney
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa                  Phone:             319-335-3386
Department of Statistics and        Fax:               319-335-3017
    Actuarial Science
241 Schaeffer Hall                  email:   luke-tierney using uiowa.edu
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu/


More information about the R-package-devel mailing list