Change 34598 by [EMAIL PROTECTED] on 2008/10/26 20:54:43
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.
Affected files ...
... //depot/perl/handy.h#149 edit
Differences ...
==== //depot/perl/handy.h#149 (text) ====
Index: perl/handy.h
--- perl/handy.h#148~34585~ 2008-10-25 05:23:01.000000000 -0700
+++ perl/handy.h 2008-10-26 13:54:43.000000000 -0700
@@ -762,11 +762,11 @@
* 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 @@
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
End of Patch.