Skip to content

Commit 20c868f

Browse files
author
luke
committed
Add R_ext/PrtUtil.h stub with a #warning not to use. Also add a
#warning to R_ext/Callbacks.h. git-svn-id: https://svn.r-project.org/R/trunk@89105 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 71d6316 commit 20c868f

File tree

5 files changed

+42
-5
lines changed

5 files changed

+42
-5
lines changed

doc/NEWS.Rd

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,12 @@
259259
formally in \file{R_ext/Callbacks.h} are now available in the new
260260
header file \file{R_ext/ObjectTable.h}. This new header file
261261
should be used in packages instead of \file{R_ext/Callbacks.h}. To
262-
ease the transition a stub file \file{R_ext/Callbacks.h} has been
263-
added that just includes \file{R_ext/ObjectTable.h}.
262+
ease the transition, stub files \file{R_ext/Callbacks.h} and
263+
\code{R_ext/PrtUtil.h} have been added. These stub files contain
264+
\code{#warning} directives to signal warnings that these files
265+
should not be used. The stub \file{R_ext/Callbacks.h} also
266+
includes \file{R_ext/ObjectTable.h}. Packages including these headers
267+
will install successfully but with warnings for using these files.
264268
}
265269
}
266270

src/include/Makefile.win

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ R_EXT_HEADERS = \
2121
Connections.h Constants.h Error.h \
2222
GraphicsDevice.h GraphicsEngine.h Itermacros.h \
2323
Lapack.h Linpack.h MathThreads.h Memory.h \
24-
Parse.h Print.h RS.h Rallocators.h Random.h \
24+
Parse.h Print.h PrtUtil.h RS.h Rallocators.h Random.h \
2525
Rdynload.h Riconv.h RStartup.h Utils.h libextern.h \
2626
stats_package.h stats_stubs.h Visibility.h ObjectTable.h
2727

src/include/R_ext/Callbacks.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@
2222
*/
2323

2424
/*
25-
Not part of the API, subject to change at any time.
25+
Not part of the API; this header file will be removed.
2626
*/
2727

2828
#ifndef R_FAKE_CALLBACKS_H
2929
#define R_FAKE_CALLBACKS_H
3030

3131
// new code should include R_ext/ObjectTable.h directly
32+
#warning include R_ext/ObjectTable.h for R_ObjectTable declarations
3233
#include <R_ext/ObjectTable.h>
3334

3435
#endif /* R_FAKE_CALLBACKS_H */

src/include/R_ext/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ R_EXT_HEADERS = \
2020
Constants.h Error.h GetX11Image.h \
2121
GraphicsDevice.h GraphicsEngine.h Itermacros.h \
2222
Lapack.h Linpack.h MathThreads.h Memory.h QuartzDevice.h \
23-
Parse.h Print.h RS.h Rallocators.h Random.h \
23+
Parse.h Print.h PrtUtil.h RS.h Rallocators.h Random.h \
2424
Rdynload.h Riconv.h RStartup.h Utils.h eventloop.h libextern.h \
2525
stats_package.h stats_stubs.h Visibility.h ObjectTable.h
2626

src/include/R_ext/PrtUtil.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* R : A Computer Language for Statistical Data Analysis
3+
* Copyright (C) 1998-2023 The R Core Team
4+
*
5+
* This header file is free software; you can redistribute it and/or modify
6+
* it under the terms of the GNU Lesser General Public License as published by
7+
* the Free Software Foundation; either version 2.1 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This file is part of R. R is distributed under the terms of the
11+
* GNU General Public License, either Version 2, June 1991 or Version 3,
12+
* June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
13+
*
14+
* This program is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU Lesser General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Lesser General Public License
20+
* along with this program; if not, a copy is available at
21+
* https://www.R-project.org/Licenses/
22+
*/
23+
24+
/*
25+
Not part of the API; this header file will be removed.
26+
*/
27+
#ifndef FAKE_PRTUTIL_H_
28+
#define FAKE_PRTUTIL_H_
29+
30+
#warning non-API header file R_ext/PrtUtil.h is obsolete and will be removed
31+
32+
#endif /* FAKE_PRTUTIL_H_ */

0 commit comments

Comments
 (0)