Message-ID: <AM2PR05MB0771D366F6E514BCE535C68DB0C30@AM2PR05MB0771.eurprd05.prod.outlook.com>
Date: 2016-01-21T16:39:59Z
From: Tom Quarendon
Subject: [R-pkg-devel] How to pass a connection into a C function (R 3.2)
I would like to implement a package that contains a C function that writes to a connection.
So the R_ext/Connections.h defines what a connection IS, but not how to get one.
What seems to work is to manually declare
Rconnection getConnection(int n);
In my C file, and while this works, and I can then use the connection object, it fails package validation with:
?Found non-API call to R: ?getConnection?
Compiled code should not call non-API entry points in R.?
So how am I supposed to do this? Is there a way? Or do I just live with the check warning (ideally not)?
Thanks.
[[alternative HTML version deleted]]