[svn:parrot] r45812 - in branches/immutable_strings_part1: include/parrot src/io
petdance at svn.parrot.org
petdance at svn.parrot.org
Tue Apr 20 01:16:56 UTC 2010
Author: petdance
Date: Tue Apr 20 01:16:55 2010
New Revision: 45812
URL: https://trac.parrot.org/parrot/changeset/45812
Log:
fixing consts and annotations
Modified:
branches/immutable_strings_part1/include/parrot/io.h
branches/immutable_strings_part1/src/io/buffer.c
branches/immutable_strings_part1/src/io/filehandle.c
Modified: branches/immutable_strings_part1/include/parrot/io.h
==============================================================================
--- branches/immutable_strings_part1/include/parrot/io.h Mon Apr 19 17:02:35 2010 (r45811)
+++ branches/immutable_strings_part1/include/parrot/io.h Tue Apr 20 01:16:55 2010 (r45812)
@@ -453,14 +453,17 @@
FUNC_MODIFIES(*filehandle)
FUNC_MODIFIES(*buf);
+PARROT_WARN_UNUSED_RESULT
size_t Parrot_io_read_buffer(PARROT_INTERP,
ARGMOD(PMC *filehandle),
- ARGIN(STRING **buf))
+ ARGMOD(STRING **buf))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3)
- FUNC_MODIFIES(*filehandle);
+ FUNC_MODIFIES(*filehandle)
+ FUNC_MODIFIES(*buf);
+PARROT_WARN_UNUSED_RESULT
size_t Parrot_io_readline_buffer(PARROT_INTERP,
ARGMOD(PMC *filehandle),
ARGOUT(STRING **buf))
@@ -646,7 +649,7 @@
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
INTVAL Parrot_io_parse_open_flags(PARROT_INTERP,
- ARGIN_NULLOK(STRING *mode_str))
+ ARGIN_NULLOK(const STRING *mode_str))
__attribute__nonnull__(1);
PARROT_EXPORT
Modified: branches/immutable_strings_part1/src/io/buffer.c
==============================================================================
--- branches/immutable_strings_part1/src/io/buffer.c Mon Apr 19 17:02:35 2010 (r45811)
+++ branches/immutable_strings_part1/src/io/buffer.c Tue Apr 20 01:16:55 2010 (r45812)
@@ -266,9 +266,10 @@
*/
+PARROT_WARN_UNUSED_RESULT
size_t
Parrot_io_read_buffer(PARROT_INTERP, ARGMOD(PMC *filehandle),
- ARGIN(STRING **buf))
+ ARGMOD(STRING **buf))
{
ASSERT_ARGS(Parrot_io_read_buffer)
unsigned char *out_buf, *buffer_start, *buffer_next, *buffer_end;
@@ -449,6 +450,7 @@
*/
+PARROT_WARN_UNUSED_RESULT
size_t
Parrot_io_readline_buffer(PARROT_INTERP, ARGMOD(PMC *filehandle), ARGOUT(STRING **buf))
{
Modified: branches/immutable_strings_part1/src/io/filehandle.c
==============================================================================
--- branches/immutable_strings_part1/src/io/filehandle.c Mon Apr 19 17:02:35 2010 (r45811)
+++ branches/immutable_strings_part1/src/io/filehandle.c Tue Apr 20 01:16:55 2010 (r45812)
@@ -27,7 +27,8 @@
=over 4
-=item C<INTVAL Parrot_io_parse_open_flags(PARROT_INTERP, STRING *mode_str)>
+=item C<INTVAL Parrot_io_parse_open_flags(PARROT_INTERP, const STRING
+*mode_str)>
Parses a Parrot string for file open mode flags (C<r> for read, C<w> for write,
C<a> for append, and C<p> for pipe) and returns the combined generic bit flags.
@@ -39,7 +40,7 @@
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
INTVAL
-Parrot_io_parse_open_flags(PARROT_INTERP, ARGIN_NULLOK(STRING *mode_str))
+Parrot_io_parse_open_flags(PARROT_INTERP, ARGIN_NULLOK(const STRING *mode_str))
{
ASSERT_ARGS(Parrot_io_parse_open_flags)
INTVAL i, mode_len;
More information about the parrot-commits
mailing list