From ripley at stats.ox.ac.uk  Thu Feb 16 13:58:37 2006
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Thu, 16 Feb 2006 12:58:37 +0000 (GMT)
Subject: [Rd] Rf_errorcall - translate to Pascal
In-Reply-To: <47fce0650602160247w58a5f770s@mail.gmail.com>
References: <47fce0650602160055y33a4c253r@mail.gmail.com>
	<47fce0650602160247w58a5f770s@mail.gmail.com>
Message-ID: <Pine.LNX.4.64.0602161235070.12709@gannet.stats.ox.ac.uk>

On Thu, 16 Feb 2006, Hans-Peter wrote:

> 2006/2/16, Hans-Peter <gchappi at gmail.com>:
>>     [Rf_errorcall is not declared here, would be something like:
>>      void Rf_errorcall(SEXP, const char *,...)]
>>
>> ... would it be possible to pull the Rf_errorcall
>> declaration to the error.h file?
>
> error.h doesn't look like a good place as the SEXP type is not known
> there. Sorry, I am quite unfluent with this c headers...

Yes, and their names are case-sensitive too.  So it is intentional that 
errorcall is not in R_Ext/Error.h.  Since it is needed for writing 
front-ends and now mentioned in Writing R Extensions it should probably be 
in Rinternals.h.  But note that is basically the only way that a non-core 
programmer is going to be writing code that gets passed 'call' objects.

> As a sidenote: in Defn.h are two macrogroups:
>
>  /* Promise Access Macros */
>  /* Hashing Macros */
>
> which aren't declared in Rinternals.h. This is different from e.g. the groups:
>
>  /* General Cons Cell Attributes */
>  /* Primitive Access Macros */
>  ...

This is intentional.  Both Defn.h and Rinternals.h have these in a section 
protected by

#ifdef USE_RINTERNALS
#endif

and that section should not be regarded as public.  There _are_ 
(mis-titled) sections

/* Promise Access Macros */
/* Hashing Macros */

in Rinternals.h, and those are the function equivalents defined for 
external use.

All that is public is what is documented in `Writing R Extensions': other 
things are in the header files but you should not assume that they will 
even be exported in future versions of R.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] Rf_errorcall - translate to Pascal
Prof Brian Ripley