/* universal.c
*
* Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- * by Larry Wall and others
+ * 2005, by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
bool
Perl_sv_derived_from(pTHX_ SV *sv, const char *name)
{
- char *type;
+ const char *type;
HV *stash;
HV *name_stash;
void
Perl_boot_core_UNIVERSAL(pTHX)
{
- char *file = __FILE__;
+ const char file[] = __FILE__;
newXS("UNIVERSAL::isa", XS_UNIVERSAL_isa, file);
newXS("UNIVERSAL::can", XS_UNIVERSAL_can, file);
GV **gvp;
GV *gv;
SV *sv;
- char *undef;
+ const char *undef;
if (SvROK(ST(0))) {
sv = (SV*)SvRV(ST(0));
"%s does not define $%s::VERSION--version check failed",
HvNAME(pkg), HvNAME(pkg));
else {
- char *str = SvPVx(ST(0), len);
+ const char *str = SvPVx(ST(0), len);
Perl_croak(aTHX_
"%s defines neither package nor VERSION--version check failed", str);
Perl_croak(aTHX_ "Usage: version::new(class, version)");
SP -= items;
{
- char * class = (char *)SvPV_nolen(ST(0));
+ const char *class = SvPV_nolen(ST(0));
SV *vs = ST(1);
SV *rv;
if (items == 3 )
}
else
{
- version = savepv(SvPV_nolen(ver));
+ version = savesvpv(ver);
}
(void)scan_version(version,vs,TRUE);
Safefree(version);
}
Perl_croak(aTHX_ "Internals::HvREHASH $hashref");
}
+
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vim: shiftwidth=4:
+*/