Revision: 1058
Author: [email protected]
Date: Wed Feb 17 08:35:45 2010
Log: Convert char *s to const char *s to eliminate g++ deprecation warnings.
g++ is warning about casting from string constants to char *.
http://code.google.com/p/perl-devel-nytprof/source/detail?r=1058
Modified:
/trunk/FileHandle.xs
/trunk/NYTProf.xs
=======================================
--- /trunk/FileHandle.xs Wed Feb 17 08:35:39 2010
+++ /trunk/FileHandle.xs Wed Feb 17 08:35:45 2010
@@ -186,7 +186,7 @@
file->stdio_at_eof = FALSE;
file->zlib_at_eof = FALSE;
- file->zs.msg = "[Oops. zlib hasn't updated this error string]";
+ file->zs.msg = (char *)"[Oops. zlib hasn't updated this error string]";
#endif
return file;
=======================================
--- /trunk/NYTProf.xs Wed Feb 17 08:35:39 2010
+++ /trunk/NYTProf.xs Wed Feb 17 08:35:45 2010
@@ -720,7 +720,7 @@
*/
Hash_entry *e = hashtable.first_inserted;
Hash_entry *match = NULL;
- char *sep = "/";
+ const char *sep = "/";
char *base_end = strstr(file_name, " (autosplit");
char *base_start = rninstr(file_name, base_end, sep, sep+1);
STRLEN base_len;
@@ -1033,7 +1033,7 @@
}
-static char *
+static const char *
cx_block_type(PERL_CONTEXT *cx) {
switch (CxTYPE(cx)) {
case CXt_NULL: return "CXt_NULL";
@@ -1722,13 +1722,13 @@
unsigned int caller_fid;
int caller_line;
- char *caller_subpkg_pv;
+ const char *caller_subpkg_pv;
SV *caller_subnam_sv;
CV *called_cv;
int called_cv_depth;
const char *called_is_xs; /* NULL, "xsub", or "syop" */
- char *called_subpkg_pv;
+ const char *called_subpkg_pv;
SV *called_subnam_sv;
/* ensure all items are initialized in first phase of
pp_subcall_profiler */
};
@@ -1885,7 +1885,7 @@
/* compose called_subname_pv as "${pkg}::${sub}" avoiding sprintf */
STMT_START {
STRLEN len;
- char *p;
+ const char *p;
p = subr_entry->called_subpkg_pv;
while (*p)
@@ -2999,7 +2999,7 @@
sub_pkg_filename_sv(pTHX_ char *sub_name, I32 len)
{
SV **svp;
- char *delim = "::";
+ const char *delim = "::";
/* find end of package name */
char *colon = rninstr(sub_name, sub_name+(len > 0 ? len : -len),
delim, delim+2);
if (!colon || colon == sub_name)
@@ -4444,7 +4444,7 @@
PROTOTYPES: DISABLE
void
-example_xsub(char *unused="", SV *action=Nullsv, SV *arg=Nullsv)
+example_xsub(const char *unused="", SV *action=Nullsv, SV *arg=Nullsv)
CODE:
if (!action)
XSRETURN(0);
--
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.
Group hosted at: http://groups.google.com/group/develnytprof-dev
Project hosted at: http://perl-devel-nytprof.googlecode.com
CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf
To post, email: [email protected]
To unsubscribe, email: [email protected]