Skip to content

Commit e337fcf

Browse files
author
luke
committed
Moved more declarations from Rinternals.h to Defn.h.
git-svn-id: https://svn.r-project.org/R/trunk@89057 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent d87bb9a commit e337fcf

File tree

4 files changed

+40
-16
lines changed

4 files changed

+40
-16
lines changed

src/include/Defn.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ void R_check_thread(const char *s);
575575

576576
/* General Cons Cell Attributes */
577577
int (MARK)(SEXP x);
578+
int (REFCNT)(SEXP x);
578579
int (TRACKREFS)(SEXP x);
579580
void (SET_OBJECT)(SEXP x, int v);
580581
void (SET_TYPEOF)(SEXP x, int v);
@@ -659,8 +660,10 @@ SEXP CONS_NR(SEXP a, SEXP b);
659660
int (MISSING)(SEXP x);
660661

661662
/* Closure Access Functions */
663+
int (RDEBUG)(SEXP x);
662664
int (RSTEP)(SEXP x);
663665
int (RTRACE)(SEXP x);
666+
void (SET_RDEBUG)(SEXP x, int v);
664667
void (SET_RSTEP)(SEXP x, int v);
665668
void (SET_RTRACE)(SEXP x, int v);
666669
SEXP R_body_no_src(SEXP x); // body(x) without "srcref" etc, ../main/utils.c
@@ -768,6 +771,13 @@ Rboolean R_cycle_detected(SEXP s, SEXP child);
768771
void R_init_altrep(void);
769772
void R_reinit_altrep_classes(DllInfo *);
770773

774+
775+
SEXP Rf_allocVector3(SEXPTYPE, R_xlen_t, R_allocator_t*);
776+
const char * R_typeToChar(SEXP);
777+
#ifdef USE_TYPE2CHAR_2
778+
const char * R_typeToChar2(SEXP, SEXPTYPE);
779+
#endif
780+
771781
/* Defining NO_RINLINEDFUNS disables use to simulate platforms where
772782
this is not available */
773783
#if !defined(__MAIN__) && (defined(COMPILING_R) || ( __GNUC__ && !defined(__INTEL_COMPILER) )) && (defined(COMPILING_R) || !defined(NO_RINLINEDFUNS))
@@ -801,6 +811,9 @@ Rbyte *RAW0(SEXP x);
801811
Rboolean Rf_conformable(SEXP, SEXP);
802812
Rboolean Rf_isUserBinop(SEXP);
803813
int Rf_stringPositionTr(SEXP, const char *);
814+
int LENGTH_EX(SEXP x, const char *file, int line);
815+
Rboolean Rf_isValidStringF(SEXP);
816+
//R_xlen_t XLENGTH_EX(SEXP x);
804817
#endif
805818

806819
#ifdef USE_RINTERNALS
@@ -1758,6 +1771,7 @@ SEXP Rf_findFun3(SEXP, SEXP, SEXP);
17581771
void Rf_findFunctionForBody(SEXP);
17591772
int Rf_FixupDigits(SEXP, warn_type);
17601773
int Rf_FixupWidth (SEXP, warn_type);
1774+
void Rf_gsetVar(SEXP, SEXP, SEXP);
17611775
SEXP Rf_installDDVAL(int i);
17621776
SEXP Rf_installS3Signature(const char *, const char *);
17631777
bool Rf_isFree(SEXP);
@@ -2181,6 +2195,8 @@ SEXP R_data_class(SEXP , Rboolean);
21812195
SEXP R_data_class2(SEXP);
21822196
char *R_LibraryFileName(const char *, char *, size_t);
21832197
SEXP R_LoadFromFile(FILE*, int);
2198+
int R_nchar(SEXP string, nchar_type type_,
2199+
Rboolean allowNA, Rboolean keepNA, const char* msg_name);
21842200
SEXP R_NewHashedEnv(SEXP, int);
21852201
extern int R_Newhashpjw(const char *);
21862202
FILE* R_OpenLibraryFile(const char *);
@@ -2195,6 +2211,7 @@ Rboolean R_seemsOldStyleS4Object(SEXP object);
21952211
int R_SetOptionWarn(int);
21962212
int R_SetOptionWidth(int);
21972213
SEXP R_SetOption(SEXP, SEXP);
2214+
SEXP Rf_substitute(SEXP,SEXP);
21982215
void R_Suicide(const char *);
21992216
SEXP R_flexiblas_info(void);
22002217
void R_getProcTime(double *data);
@@ -2209,6 +2226,7 @@ SEXP strmat2intmat(SEXP, SEXP, SEXP, SEXP);
22092226
SEXP substituteList(SEXP, SEXP);
22102227
unsigned int TimeToSeed(void);
22112228
SEXP tspgets(SEXP, SEXP);
2229+
SEXP Rf_type2rstr(SEXPTYPE);
22122230
SEXP type2symbol(SEXPTYPE);
22132231
void unbindVar(SEXP, SEXP);
22142232
#ifdef ALLOW_OLD_SAVE

src/include/Rinternals.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ int (OBJECT)(SEXP x);
263263
//int (MARK)(SEXP x);
264264
int (TYPEOF)(SEXP x);
265265
int (NAMED)(SEXP x);
266-
int (REFCNT)(SEXP x);
266+
//int (REFCNT)(SEXP x);
267267
void SET_ATTRIB(SEXP x, SEXP v);
268268
void DUPLICATE_ATTRIB(SEXP to, SEXP from);
269269
void SHALLOW_DUPLICATE_ATTRIB(SEXP to, SEXP from);
@@ -346,10 +346,10 @@ SEXP SETCAD4R(SEXP e, SEXP y);
346346
SEXP (FORMALS)(SEXP x);
347347
SEXP (BODY)(SEXP x);
348348
SEXP (CLOENV)(SEXP x);
349-
int (RDEBUG)(SEXP x);
349+
//int (RDEBUG)(SEXP x);
350350
//int (RSTEP)(SEXP x);
351351
//int (RTRACE)(SEXP x);
352-
void (SET_RDEBUG)(SEXP x, int v);
352+
//void (SET_RDEBUG)(SEXP x, int v);
353353
//void (SET_RSTEP)(SEXP x, int v);
354354
//void (SET_RTRACE)(SEXP x, int v);
355355
void SET_FORMALS(SEXP x, SEXP v);
@@ -509,7 +509,7 @@ SEXP Rf_allocList(int);
509509
SEXP Rf_allocS4Object(void);
510510
SEXP Rf_allocSExp(SEXPTYPE);
511511
// next is not documented but generated by inlined calls to Rf_allocVector
512-
SEXP Rf_allocVector3(SEXPTYPE, R_xlen_t, R_allocator_t*);
512+
//SEXP Rf_allocVector3(SEXPTYPE, R_xlen_t, R_allocator_t*);
513513
R_xlen_t Rf_any_duplicated(SEXP x, Rboolean from_last); // unique.c
514514
R_xlen_t Rf_any_duplicated3(SEXP x, SEXP incomp, Rboolean from_last); // unique.c
515515
SEXP Rf_classgets(SEXP, SEXP);
@@ -545,7 +545,7 @@ SEXP Rf_GetOption1(SEXP);
545545
//int Rf_GetOptionDigits(void);
546546
int Rf_GetOptionWidth(void);
547547
SEXP Rf_GetRowNames(SEXP);
548-
void Rf_gsetVar(SEXP, SEXP, SEXP);
548+
//void Rf_gsetVar(SEXP, SEXP, SEXP);
549549
SEXP Rf_install(const char *);
550550
SEXP Rf_installChar(SEXP);
551551
//SEXP Rf_installNoTrChar(SEXP);
@@ -569,8 +569,8 @@ SEXP Rf_nthcdr(SEXP, int);
569569

570570
// ../main/character.c :
571571
typedef enum {Bytes, Chars, Width} nchar_type;
572-
int R_nchar(SEXP string, nchar_type type_,
573-
Rboolean allowNA, Rboolean keepNA, const char* msg_name);
572+
//int R_nchar(SEXP string, nchar_type type_,
573+
// Rboolean allowNA, Rboolean keepNA, const char* msg_name);
574574

575575
SEXP R_ParseEvalString(const char *, SEXP);
576576
SEXP R_ParseString(const char *);
@@ -582,16 +582,16 @@ SEXP Rf_setAttrib(SEXP, SEXP, SEXP);
582582
void Rf_setVar(SEXP, SEXP, SEXP);
583583
SEXPTYPE Rf_str2type(const char *);
584584
Rboolean Rf_StringBlank(SEXP); // util.c
585-
SEXP Rf_substitute(SEXP,SEXP);
585+
//SEXP Rf_substitute(SEXP,SEXP);
586586
SEXP Rf_topenv(SEXP, SEXP);
587587
const char * Rf_translateChar(SEXP);
588588
const char * Rf_translateCharUTF8(SEXP);
589589
const char * Rf_type2char(SEXPTYPE);
590-
const char * R_typeToChar(SEXP);
590+
//const char * R_typeToChar(SEXP);
591591
#ifdef USE_TYPE2CHAR_2
592-
const char * R_typeToChar2(SEXP, SEXPTYPE);
592+
//const char * R_typeToChar2(SEXP, SEXPTYPE);
593593
#endif
594-
SEXP Rf_type2rstr(SEXPTYPE);
594+
//SEXP Rf_type2rstr(SEXPTYPE);
595595
SEXP Rf_type2str(SEXPTYPE);
596596
SEXP Rf_type2str_nowarn(SEXPTYPE);
597597
#ifndef INLINE_PROTECT
@@ -1101,7 +1101,7 @@ Rboolean Rf_isPrimitive(SEXP);
11011101
Rboolean Rf_isTs(SEXP);
11021102
//Rboolean Rf_isUserBinop(SEXP);
11031103
Rboolean Rf_isValidString(SEXP);
1104-
Rboolean Rf_isValidStringF(SEXP);
1104+
//Rboolean Rf_isValidStringF(SEXP);
11051105
Rboolean Rf_isVector(SEXP);
11061106
Rboolean Rf_isVectorAtomic(SEXP);
11071107
Rboolean Rf_isVectorList(SEXP);
@@ -1135,8 +1135,8 @@ SEXP Rf_ScalarString(SEXP);
11351135
R_xlen_t Rf_xlength(SEXP);
11361136
R_xlen_t (XLENGTH)(SEXP x);
11371137
R_xlen_t (XTRUELENGTH)(SEXP x);
1138-
int LENGTH_EX(SEXP x, const char *file, int line);
1139-
R_xlen_t XLENGTH_EX(SEXP x);
1138+
//int LENGTH_EX(SEXP x, const char *file, int line);
1139+
//R_xlen_t XLENGTH_EX(SEXP x);
11401140
# ifdef INLINE_PROTECT
11411141
SEXP Rf_protect(SEXP);
11421142
void Rf_unprotect(int);

src/library/stats/src/complete_cases.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@
1818
* https://www.R-project.org/Licenses/
1919
*/
2020

21-
#include <Rinternals.h>
21+
#ifdef HAVE_CONFIG_H
22+
#include <config.h>
23+
#endif
24+
25+
#include <Defn.h>
26+
2227
#include "statsErr.h"
2328

2429
#define R_MSG_type _("invalid 'type' (%s) of argument")

src/main/character.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ attribute_hidden SEXP do_nzchar(SEXP call, SEXP op, SEXP args, SEXP env)
159159
-2 ... the quantity is not computable (bytes encoding)
160160
semi-internal buffer cbuff is never freed, should be freed by caller
161161
*/
162-
// in Rinternals.h
162+
// in Defn.h
163+
attribute_hidden
163164
int R_nchar(SEXP string, nchar_type type_,
164165
Rboolean allowNA, Rboolean keepNA, const char* msg_name)
165166
{

0 commit comments

Comments
 (0)