Skip to content

Commit d2cfd85

Browse files
authored
Merge pull request #1055 from ellert/exceptions-impl-fixes
Exceptions impl fixes
2 parents ce5538b + 5af4b88 commit d2cfd85

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2020-03-22 Mattias Ellert <[email protected]>
2+
3+
* inst/include/Rcpp/exceptions_impl.h: Add include guard,
4+
Make sure RCPP_DEMANGLER_ENABLED is always defined,
5+
Add missing inline qualifier
6+
17
2020-03-18 Dirk Eddelbuettel <[email protected]>
28

39
* DESCRIPTION (Version, Date): Roll minor version

inst/include/Rcpp/exceptions_impl.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
// You should have received a copy of the GNU General Public License
1919
// along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
2020

21+
#ifndef Rcpp__exceptions_impl__h
22+
#define Rcpp__exceptions_impl__h
23+
2124
// disable demangler on platforms where we have no support
2225
#ifndef RCPP_DEMANGLER_ENABLED
2326
# if defined(_WIN32) || \
@@ -34,14 +37,16 @@
3437
# elif defined(__GNUC__) || defined(__clang__)
3538
# include <execinfo.h>
3639
# define RCPP_DEMANGLER_ENABLED 1
40+
# else
41+
# define RCPP_DEMANGLER_ENABLED 0
3742
# endif
3843
#endif
3944

4045
namespace Rcpp {
4146

4247
// Extract mangled name e.g. ./test(baz+0x14)[0x400962]
4348
#if RCPP_DEMANGLER_ENABLED
44-
static std::string demangler_one(const char* input) { // #nocov start
49+
static inline std::string demangler_one(const char* input) { // #nocov start
4550

4651
static std::string buffer;
4752

@@ -102,3 +107,4 @@ namespace Rcpp {
102107

103108
}
104109

110+
#endif

0 commit comments

Comments
 (0)