[svn:parrot] r45907 - in branches/string_consting: include/parrot src
bacek at svn.parrot.org
bacek at svn.parrot.org
Thu Apr 22 13:04:05 UTC 2010
Author: bacek
Date: Thu Apr 22 13:04:05 2010
New Revision: 45907
URL: https://trac.parrot.org/parrot/changeset/45907
Log:
Constify src/pmc.c
Modified:
branches/string_consting/include/parrot/pmc.h
branches/string_consting/src/pmc.c
Modified: branches/string_consting/include/parrot/pmc.h
==============================================================================
--- branches/string_consting/include/parrot/pmc.h Thu Apr 22 13:03:51 2010 (r45906)
+++ branches/string_consting/include/parrot/pmc.h Thu Apr 22 13:04:05 2010 (r45907)
@@ -49,7 +49,8 @@
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
-INTVAL Parrot_pmc_get_type_str(PARROT_INTERP, ARGIN_NULLOK(STRING *name))
+INTVAL Parrot_pmc_get_type_str(PARROT_INTERP,
+ ARGIN_NULLOK(const STRING *name))
__attribute__nonnull__(1);
PARROT_EXPORT
@@ -107,7 +108,8 @@
__attribute__nonnull__(1);
PARROT_EXPORT
-INTVAL Parrot_pmc_register_new_type(PARROT_INTERP, ARGIN(STRING *name))
+INTVAL Parrot_pmc_register_new_type(PARROT_INTERP,
+ ARGIN(const STRING *name))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -157,7 +159,9 @@
PMC * Parrot_pmc_new_temporary(PARROT_INTERP, INTVAL base_type)
__attribute__nonnull__(1);
-INTVAL Parrot_pmc_type_does(PARROT_INTERP, ARGIN(STRING *role), INTVAL type)
+INTVAL Parrot_pmc_type_does(PARROT_INTERP,
+ ARGIN(const STRING *role),
+ INTVAL type)
__attribute__nonnull__(1)
__attribute__nonnull__(2);
Modified: branches/string_consting/src/pmc.c
==============================================================================
--- branches/string_consting/src/pmc.c Thu Apr 22 13:03:51 2010 (r45906)
+++ branches/string_consting/src/pmc.c Thu Apr 22 13:04:05 2010 (r45907)
@@ -727,7 +727,7 @@
/*
-=item C<INTVAL Parrot_pmc_register_new_type(PARROT_INTERP, STRING *name)>
+=item C<INTVAL Parrot_pmc_register_new_type(PARROT_INTERP, const STRING *name)>
Registers the name of a new PMC type with Parrot, returning the INTVAL
representing that type.
@@ -738,7 +738,7 @@
PARROT_EXPORT
INTVAL
-Parrot_pmc_register_new_type(PARROT_INTERP, ARGIN(STRING *name))
+Parrot_pmc_register_new_type(PARROT_INTERP, ARGIN(const STRING *name))
{
ASSERT_ARGS(Parrot_pmc_register_new_type)
/* If they're looking to register an existing class, return that
@@ -763,7 +763,7 @@
/*
-=item C<INTVAL Parrot_pmc_get_type_str(PARROT_INTERP, STRING *name)>
+=item C<INTVAL Parrot_pmc_get_type_str(PARROT_INTERP, const STRING *name)>
Returns the PMC type for C<name>.
@@ -774,7 +774,7 @@
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
INTVAL
-Parrot_pmc_get_type_str(PARROT_INTERP, ARGIN_NULLOK(STRING *name))
+Parrot_pmc_get_type_str(PARROT_INTERP, ARGIN_NULLOK(const STRING *name))
{
ASSERT_ARGS(Parrot_pmc_get_type_str)
if (!name)
@@ -983,7 +983,8 @@
/*
-=item C<INTVAL Parrot_pmc_type_does(PARROT_INTERP, STRING *role, INTVAL type)>
+=item C<INTVAL Parrot_pmc_type_does(PARROT_INTERP, const STRING *role, INTVAL
+type)>
Checks to see if PMCs of the given type does the given role. Checks
C<<vtable->provides_str>> to find a match.
@@ -994,7 +995,7 @@
*/
INTVAL
-Parrot_pmc_type_does(PARROT_INTERP, ARGIN(STRING *role), INTVAL type)
+Parrot_pmc_type_does(PARROT_INTERP, ARGIN(const STRING *role), INTVAL type)
{
ASSERT_ARGS(Parrot_pmc_type_does)
More information about the parrot-commits
mailing list