From thomas.friedrichsmeier at ruhr-uni-bochum.de  Wed Jan 16 14:00:56 2013
From: thomas.friedrichsmeier at ruhr-uni-bochum.de (Thomas Friedrichsmeier)
Date: 16 Jan 2013 14:00:56 +0100
Subject: [Rd] Small clarification to R-exts, questions on ptr_do_selectlist
Message-ID: <201301161401.10833.thomas.friedrichsmeier@ruhr-uni-bochum.de>

Hi,

1. I suggest adding the following piece of advice at the end of the section 
describing R_getEmbeddingDllInfo() (currently 8.1.3) in R-exts.texi:

---
In order to call registered symbols of the embedding application from a
package, you have to specify @code{PACKAGE = "(embedding)"} in
@code{.C}, @code{.Call}, etc.
---

2. Section 8.1.2 of R-exts.text ("Setting R callbacks") has a new line "These 
callbacks should never be changed in a running R session (and hence cannot be 
called from an extension package)." I had a bit of difficulty understanding 
what "These" refers to. I believe it's meant to refer to "the above 
callbacks", only, and I suggest using that wording for easier reading.

3. While reading the sources, trying to understand how to make use of 
prt_do_selectlist, it seems that this is not actually used to 
utils::select.list(), unless 
  (.Platform$OS.type == "windows" || .Platform$GUI == "AQUA")
Is this intended?
In fact, from reading src/library/utils/src/stubs.c, it looks like 
ptr_do_selectlist (and ptr_do_data(entry|viewer), ptr_R_(add|load|
save)history) is ignored on Windows, although - from a naive POV - it would 
seem easy enough to make it functional across platforms(*).

Regards
Thomas


(*) E.g. changing the selectlist stub to:
--
SEXP selectlist(SEXP call, SEXP op, SEXP args, SEXP env)
{
    if(ptr_do_selectlist) return ptr_do_selectlist(call, op, CDR(args), env);
#ifdef Win32
    return Win_selectlist(CDR(args));
#else
    return R_NilValue;
#endif
}
--
and removing the Windows specific stub, earlier in the file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20130116/3cc424bd/attachment.bin>


[Rd] Small clarification to R-exts, questions on ptr_do_selectlist
Thomas Friedrichsmeier