#define TRUE (1)
#define FALSE (0)
+/* The MUTABLE_*() macros cast pointers to the types shown, in such a way
+ * (compiler permitting) that casting away const-ness will give a warning;
+ * e.g.:
+ *
+ * const SV *sv = ...;
+ * AV *av1 = (AV*)sv; <== BAD: the const has been silently cast away
+ * AV *av2 = MUTABLE_AV(sv); <== GOOD: it may warn
+ */
+
#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
# define MUTABLE_PTR(p) ({ void *_p = (p); _p; })
#else
#define isDIGIT_uni(c) is_uni_digit(c)
#define isUPPER_uni(c) is_uni_upper(c)
#define isLOWER_uni(c) is_uni_lower(c)
-#define isALNUMC_uni(c) is_uni_alnumc(c)
#define isASCII_uni(c) is_uni_ascii(c)
#define isCNTRL_uni(c) is_uni_cntrl(c)
#define isGRAPH_uni(c) is_uni_graph(c)
#define isDIGIT_LC_uvchr(c) (c < 256 ? isDIGIT_LC(c) : is_uni_digit_lc(c))
#define isUPPER_LC_uvchr(c) (c < 256 ? isUPPER_LC(c) : is_uni_upper_lc(c))
#define isLOWER_LC_uvchr(c) (c < 256 ? isLOWER_LC(c) : is_uni_lower_lc(c))
-#define isALNUMC_LC_uvchr(c) (c < 256 ? isALNUMC_LC(c) : is_uni_alnumc_lc(c))
#define isCNTRL_LC_uvchr(c) (c < 256 ? isCNTRL_LC(c) : is_uni_cntrl_lc(c))
#define isGRAPH_LC_uvchr(c) (c < 256 ? isGRAPH_LC(c) : is_uni_graph_lc(c))
#define isPRINT_LC_uvchr(c) (c < 256 ? isPRINT_LC(c) : is_uni_print_lc(c))
#define isDIGIT_utf8(p) is_utf8_digit(p)
#define isUPPER_utf8(p) is_utf8_upper(p)
#define isLOWER_utf8(p) is_utf8_lower(p)
-#define isALNUMC_utf8(p) is_utf8_alnumc(p)
#define isASCII_utf8(p) is_utf8_ascii(p)
#define isCNTRL_utf8(p) is_utf8_cntrl(p)
#define isGRAPH_utf8(p) is_utf8_graph(p)
* which more importantly get the immediate calling environment (file and
* line number, and C function name if available) passed in. This info can
* then be used for logging the calls, for which one gets a sample
- * implementation if PERL_MEM_LOG_STDERR is defined.
+ * implementation unless -DPERL_MEM_LOG_NOIMPL is also defined.
*
* Known problems:
* - all memory allocs do not get logged, only those
* (keyed by the allocation address?), and maintain that
* through reallocs and frees, but how to do that without
* any News() happening...?
+ * - lots of -Ddefines to get useful/controllable output
+ * - lots of ENV reads
*/
PERL_EXPORT_C Malloc_t Perl_mem_log_alloc(const UV n, const UV typesize, const char *type_name, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname);
PERL_EXPORT_C Malloc_t Perl_mem_log_free(Malloc_t oldalloc, const char *filename, const int linenumber, const char *funcname);
# ifdef PERL_CORE
-# ifdef PERL_MEM_LOG_STDERR
+# ifndef PERL_MEM_LOG_NOIMPL
enum mem_log_type {
MLT_ALLOC,
MLT_REALLOC,
#define pTHX__VALUE
#endif /* USE_ITHREADS */
+/* Perl_deprecate was not part of the public API, and did not have a deprecate()
+ shortcut macro defined without -DPERL_CORE. Neither codesearch.google.com nor
+ CPAN::Unpack show any users outside the core. */
+#ifdef PERL_CORE
+# define deprecate(s) Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), "Use of " s " is deprecated")
+#endif
+
/*
* Local variables:
* c-indentation-style: bsd