From a8a2ceaa337ed7cb30711de145f484033c43b07d Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sat, 29 Dec 2012 20:18:09 -0700 Subject: Create deprecated fncs to replace to-be-removed macros These macros should not be used as they are prone to misuse. There are no occurrences of them in CPAN. The single use of either of them in core has recently been removed (commit 8d40577bdbdfa85ed3293f84bf26a313b1b92f55), because it was a misuse. Instead code should use isIDFIRST_lazy_if or isWORDCHAR_lazy_if (isALNUM_lazy_if is also available, but can be confused with the Posix alnum, which it doesn't mean). --- inline.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'inline.h') diff --git a/inline.h b/inline.h index b321cc29b9..85bdc74557 100644 --- a/inline.h +++ b/inline.h @@ -138,3 +138,24 @@ S_croak_memory_wrap(void) #ifdef __clang__ #pragma clang diagnostic pop #endif + +/* ------------------------------- utf8.h ------------------------------- */ + +/* These exist only to replace the macros they formerly were so that their use + * can be deprecated */ + +PERL_STATIC_INLINE bool +S_isIDFIRST_lazy(pTHX_ const char* p) +{ + PERL_ARGS_ASSERT_ISIDFIRST_LAZY; + + return isIDFIRST_lazy_if(p,1); +} + +PERL_STATIC_INLINE bool +S_isALNUM_lazy(pTHX_ const char* p) +{ + PERL_ARGS_ASSERT_ISALNUM_LAZY; + + return isALNUM_lazy_if(p,1); +} -- cgit v1.2.1