summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorMarcus Holland-Moritz <mhx-perl@gmx.net>2008-10-26 20:54:43 +0000
committerMarcus Holland-Moritz <mhx-perl@gmx.net>2008-10-26 20:54:43 +0000
commit12754f92d4030382428f3ea50316b5f5ec03b315 (patch)
tree719f48a4186b4f01b13ea8045ce9abb3f96b521e /handy.h
parentd8723f436e1dd34e1353ad7e3538918033d31d15 (diff)
downloadperl-12754f92d4030382428f3ea50316b5f5ec03b315.tar.gz
Make sure Perl_mem_log_(?:alloc|realloc|free) have C linkage,
so modules like Digest::MD5, that are including perl.h from within an 'extern "C"' block, will actually see them when building with a C++ compiler. Also make sure that Perl_mem_log_(?:new|del)_sv are only seen by sv.c. p4raw-id: //depot/perl@34598
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/handy.h b/handy.h
index ca80375d47..d51b75dc81 100644
--- a/handy.h
+++ b/handy.h
@@ -762,11 +762,11 @@ PoisonWith(0xEF) for catching access to freed memory.
* any News() happening...?
*/
-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_alloc(const UV n, const UV typesize, const char *type_name, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname);
-Malloc_t Perl_mem_log_realloc(const UV n, const UV typesize, const char *type_name, Malloc_t oldalloc, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname);
+PERL_EXPORT_C Malloc_t Perl_mem_log_realloc(const UV n, const UV typesize, const char *type_name, Malloc_t oldalloc, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname);
-Malloc_t Perl_mem_log_free(Malloc_t oldalloc, 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
@@ -778,9 +778,10 @@ enum mem_log_type {
MLT_DEL_SV
};
# endif
-/* those are only used in sv.c */
+# if defined(PERL_IN_SV_C) /* those are only used in sv.c */
void Perl_mem_log_new_sv(const SV *sv, const char *filename, const int linenumber, const char *funcname);
void Perl_mem_log_del_sv(const SV *sv, const char *filename, const int linenumber, const char *funcname);
+# endif
# endif
#endif