From 4f4dc62d1459c2cff4a78da09c980fd7cc8dfc18 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Sat, 28 Jan 2023 14:34:52 +0000 Subject: Make the new optree function declarations conditional on PERL_CORE|PERL_USE_VOLATILE_API --- proto.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'proto.h') diff --git a/proto.h b/proto.h index d20764e8dd..ea54b79513 100644 --- a/proto.h +++ b/proto.h @@ -1126,11 +1126,6 @@ Perl_filter_read(pTHX_ int idx, SV *buf_sv, int maxlen) #define PERL_ARGS_ASSERT_FILTER_READ \ assert(buf_sv) -PERL_CALLCONV void -Perl_finalize_optree(pTHX_ OP *o); -#define PERL_ARGS_ASSERT_FINALIZE_OPTREE \ - assert(o) - PERL_CALLCONV CV * Perl_find_lexical_cv(pTHX_ PADOFFSET off) __attribute__visibility__("hidden"); @@ -3263,11 +3258,6 @@ Perl_op_wrap_finally(pTHX_ OP *block, OP *finally) #define PERL_ARGS_ASSERT_OP_WRAP_FINALLY \ assert(block); assert(finally) -PERL_CALLCONV void -Perl_optimize_optree(pTHX_ OP *o); -#define PERL_ARGS_ASSERT_OPTIMIZE_OPTREE \ - assert(o) - PERL_CALLCONV void Perl_package(pTHX_ OP *o) __attribute__visibility__("hidden"); @@ -6143,6 +6133,18 @@ S_my_memrchr(const char *s, const char c, const STRLEN len); # endif /* !defined(HAS_MEMRCHR) */ # endif /* !defined(PERL_NO_INLINE_FUNCTIONS) */ #endif /* defined(PERL_CORE) || defined(PERL_EXT) */ +#if defined(PERL_CORE) || defined(PERL_USE_VOLATILE_API) +PERL_CALLCONV void +Perl_finalize_optree(pTHX_ OP *o); +# define PERL_ARGS_ASSERT_FINALIZE_OPTREE \ + assert(o) + +PERL_CALLCONV void +Perl_optimize_optree(pTHX_ OP *o); +# define PERL_ARGS_ASSERT_OPTIMIZE_OPTREE \ + assert(o) + +#endif /* defined(PERL_CORE) || defined(PERL_USE_VOLATILE_API) */ #if defined(PERL_DEBUG_READONLY_COW) PERL_CALLCONV void Perl_sv_buf_to_ro(pTHX_ SV *sv) -- cgit v1.2.1