search for: r_getconnect

Displaying 7 results from an estimated 7 matches for "r_getconnect".

2017 Jun 12
1
Custom connections
...connection APIs". "Writing R Extensions" has: > Facilities for defining custom connection implementations are provided in > R_ext/Connections.h, but make sure you consult the file before use. This appeared in the R 3.3.0 NEWS: > The connections API now includes a function R_GetConnection() which allows packages > implementing connections to convert R connection objects to Rconnection handles used in the > API. Code which previously used the low-level R-internal getConnection() entry point should > switch to the official API. However, from today, the R 3.3.0 NEWS item...
2020 May 06
2
defining r audio connections
yep, you're right, after some initial clean-up and running with or without --as-cran R CMD check gives a NOTE * checking compiled code File ?socketeer/libs/socketeer.so?: Found non-API calls to R: ?R_GetConnection?, ?R_new_custom_connection? Compiled code should not call non-API entry points in R. See 'Writing portable packages' in the 'Writing R Extensions' manual. Connections in general seem more useful than ad-hoc functions, though perhaps for Frederick's use cas...
2018 Oct 31
1
PATCH: Asserting that 'connection' used has not changed + R_GetConnection2()
...ted connection. The 'id' field is available via attribute 'conn_id' part of a 'connection' object. PATCH: See attached 'connection.patch' file (or https://github.com/HenrikBengtsson/Wishlist-for-R/issues/81#issuecomment-434210222). The patch introduces a new SEXP R_GetConnection2(SEXP sConn) function, which looks up a connection by its index *and* the 'id' field. This function is backward compatible with R_GetConnection(), which looks up a connection by its index (only). In addition, R_GetConnection2() also accepts 'sConn' of type integer, which the look...
2020 May 07
1
defining r audio connections
...ail.com> wrote: > > > yep, you're right, after some initial clean-up and running with or > without > > --as-cran R CMD check gives a NOTE > > > > * checking compiled code > > File ?socketeer/libs/socketeer.so?: > > Found non-API calls to R: ?R_GetConnection?, > > ?R_new_custom_connection? > > > > Compiled code should not call non-API entry points in R. > > > > See 'Writing portable packages' in the 'Writing R Extensions' manual. > > > > Connections in general seem more useful than...
2020 May 07
0
defining r audio connections
...6 Martin Morgan <mtmorgan.bioc at gmail.com> wrote: > yep, you're right, after some initial clean-up and running with or without > --as-cran R CMD check gives a NOTE > > * checking compiled code > File ?socketeer/libs/socketeer.so?: > Found non-API calls to R: ?R_GetConnection?, > ?R_new_custom_connection? > > Compiled code should not call non-API entry points in R. > > See 'Writing portable packages' in the 'Writing R Extensions' manual. > > Connections in general seem more useful than ad-hoc functions, though > perh...
2006 Oct 09
1
Discussion starter for package level Connection API
...ght balance between opening up the internals to package writers and not allowing them to do bad things. My first attempt at cracking this nut is to just memcpy() the Rconnection and not allow access to the private stuff: /* Alternative to allowing C code access to connection API. */ Rconnection R_GetConnection(Rconnection ucon, int idx){ Rconnection rcon; /* Valid connection? */ if ((rcon = getConnection(idx)) == NULL) return NULL; memcpy(ucon,rcon,sizeof(struct Rconn)); /* Don't reveal private data */ ucon->private = NULL; return ucon; } This wo...
2020 May 06
2
defining r audio connections
The public connection API is defined in https://github.com/wch/r-source/blob/trunk/src/include/R_ext/Connections.h I'm not sure of a good pedagogic example; people who want to write their own connections usually want to do so for complicated reasons! This is my own abandoned attempt