Author: julianalbo
Date: Fri Jul 18 07:22:12 2008
New Revision: 29584
Modified:
trunk/src/pmc/default.pmc
Log:
avoid access to string internals in default.pmc
Modified: trunk/src/pmc/default.pmc
==============================================================================
--- trunk/src/pmc/default.pmc (original)
+++ trunk/src/pmc/default.pmc Fri Jul 18 07:22:12 2008
@@ -30,7 +30,7 @@
/*
-=item C<static const char *caller(PARROT_INTERP, PMC *pmc)>
+=item C<static STRING *caller(PARROT_INTERP, PMC *pmc)>
Returns a C string for the name of C<*pmc>.
@@ -38,11 +38,11 @@
*/
-static const char *
+static STRING *
caller(PARROT_INTERP, PMC *pmc /*NULLOK*/)
{
return pmc && pmc->vtable && pmc->vtable->whoami ?
- VTABLE_name(interp, pmc)->strstart : "(null)";
+ VTABLE_name(interp, pmc) : CONST_STRING(interp, "(null)");
}
/*
@@ -61,7 +61,7 @@
cant_do_method(PARROT_INTERP, PMC *pmc /*NULLOK*/, const char *methname)
{
real_exception(interp, NULL, ILL_INHERIT,
- "%s() not implemented in class '%s'", methname,
+ "%s() not implemented in class '%Ss'", methname,
caller(interp, pmc));
}
@@ -296,7 +296,7 @@
SELF.init();
else
real_exception(interp, NULL, ILL_INHERIT,
- "init_pmc() not implemented in class '%s'",
+ "init_pmc() not implemented in class '%Ss'",
caller(interp, pmc));
}