[svn:parrot] r36715 - trunk/src/pmc
petdance at svn.parrot.org
petdance at svn.parrot.org
Sat Feb 14 06:04:07 UTC 2009
Author: petdance
Date: Sat Feb 14 06:04:04 2009
New Revision: 36715
URL: https://trac.parrot.org/parrot/changeset/36715
Log:
more consting
Modified:
trunk/src/pmc/filehandle.pmc
trunk/src/pmc/multisub.pmc
trunk/src/pmc/os.pmc
Modified: trunk/src/pmc/filehandle.pmc
==============================================================================
--- trunk/src/pmc/filehandle.pmc Sat Feb 14 04:43:50 2009 (r36714)
+++ trunk/src/pmc/filehandle.pmc Sat Feb 14 06:04:04 2009 (r36715)
@@ -476,7 +476,7 @@
*/
METHOD print(PMC *to_print) {
- STRING *string_to_print = VTABLE_get_string(INTERP, to_print);
+ STRING * const string_to_print = VTABLE_get_string(INTERP, to_print);
Parrot_io_putps(interp, SELF, string_to_print);
}
@@ -546,9 +546,9 @@
METHOD buffer_type(STRING *new_type :optional, INTVAL got_type :opt_flag) {
INTVAL flags;
- STRING *nobuffer_string = CONST_STRING(INTERP, "unbuffered");
- STRING *linebuffer_string = CONST_STRING(INTERP, "line-buffered");
- STRING *fullbuffer_string = CONST_STRING(INTERP, "full-buffered");
+ STRING * const nobuffer_string = CONST_STRING(INTERP, "unbuffered");
+ STRING * const linebuffer_string = CONST_STRING(INTERP, "line-buffered");
+ STRING * const fullbuffer_string = CONST_STRING(INTERP, "full-buffered");
if (got_type) {
if (Parrot_str_not_equal(INTERP, new_type, nobuffer_string) == 0)
Modified: trunk/src/pmc/multisub.pmc
==============================================================================
--- trunk/src/pmc/multisub.pmc Sat Feb 14 04:43:50 2009 (r36714)
+++ trunk/src/pmc/multisub.pmc Sat Feb 14 06:04:04 2009 (r36715)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2008, The Perl Foundation.
+Copyright (C) 2001-2009, The Perl Foundation.
$Id$
=head1 NAME
@@ -37,7 +37,7 @@
}
VTABLE void set_pmc_keyed_int(INTVAL key, PMC *value) {
- STRING *_sub = CONST_STRING(interp, "Sub");
+ STRING * const _sub = CONST_STRING(interp, "Sub");
if (!VTABLE_isa(interp, value, _sub))
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
"attempt to set non Sub PMC");
@@ -126,10 +126,6 @@
F<$perl6/doc/trunk/design/apo/A12.pod>,
F<$perl6/doc/trunk/design/syn/S12.pod>
-=head1 HISTORY
-
-Initial version - leo 14.03.2005
-
=cut
*/
Modified: trunk/src/pmc/os.pmc
==============================================================================
--- trunk/src/pmc/os.pmc Sat Feb 14 04:43:50 2009 (r36714)
+++ trunk/src/pmc/os.pmc Sat Feb 14 06:04:04 2009 (r36715)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2008, The Perl Foundation.
+Copyright (C) 2001-2009, The Perl Foundation.
$Id$
=head1 NAME
@@ -118,7 +118,7 @@
#endif
Parrot_str_free_cstring(cpath);
if (error) {
- char *errmsg = strerror(errno);
+ const char * const errmsg = strerror(errno);
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_EXTERNAL_ERROR,
errmsg);
}
@@ -185,9 +185,9 @@
char * const cpath = Parrot_str_to_cstring(interp, path);
/* should we validate mode? */
#ifdef WIN32
- int error = _mkdir(cpath);
+ const int error = _mkdir(cpath);
#else
- int error = mkdir(cpath, (mode_t)mode);
+ const int error = mkdir(cpath, (mode_t)mode);
#endif
Parrot_str_free_cstring(cpath);
if (error) {
More information about the parrot-commits
mailing list