[svn:parrot] r45898 - in branches/string_consting: include/parrot src/io
bacek at svn.parrot.org
bacek at svn.parrot.org
Thu Apr 22 11:32:57 UTC 2010
Author: bacek
Date: Thu Apr 22 11:32:57 2010
New Revision: 45898
URL: https://trac.parrot.org/parrot/changeset/45898
Log:
Consting IO API
Modified:
branches/string_consting/include/parrot/io.h
branches/string_consting/src/io/api.c
Modified: branches/string_consting/include/parrot/io.h
==============================================================================
--- branches/string_consting/include/parrot/io.h Thu Apr 22 11:32:42 2010 (r45897)
+++ branches/string_consting/include/parrot/io.h Thu Apr 22 11:32:57 2010 (r45898)
@@ -174,7 +174,7 @@
PMC * Parrot_io_fdopen(PARROT_INTERP,
ARGIN_NULLOK(PMC *pmc),
PIOHANDLE fd,
- ARGIN(STRING *sflags))
+ ARGIN(const STRING *sflags))
__attribute__nonnull__(1)
__attribute__nonnull__(4);
@@ -231,8 +231,8 @@
PARROT_CANNOT_RETURN_NULL
PMC * Parrot_io_open(PARROT_INTERP,
ARGIN_NULLOK(PMC *pmc),
- ARGIN_NULLOK(STRING *path),
- ARGIN_NULLOK(STRING *mode))
+ ARGIN_NULLOK(const STRING *path),
+ ARGIN_NULLOK(const STRING *mode))
__attribute__nonnull__(1);
PARROT_EXPORT
@@ -258,7 +258,7 @@
PARROT_EXPORT
INTVAL Parrot_io_putps(PARROT_INTERP,
ARGMOD(PMC *pmc),
- ARGMOD_NULLOK(STRING *s))
+ ARGMOD_NULLOK(const STRING *s))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(*pmc)
Modified: branches/string_consting/src/io/api.c
==============================================================================
--- branches/string_consting/src/io/api.c Thu Apr 22 11:32:42 2010 (r45897)
+++ branches/string_consting/src/io/api.c Thu Apr 22 11:32:57 2010 (r45898)
@@ -101,8 +101,8 @@
/*
-=item C<PMC * Parrot_io_open(PARROT_INTERP, PMC *pmc, STRING *path, STRING
-*mode)>
+=item C<PMC * Parrot_io_open(PARROT_INTERP, PMC *pmc, const STRING *path, const
+STRING *mode)>
Return an open filehandle for a given string path and flags. Defaults to
creating a new FileHandle PMC. If a PMC object is passed in, it uses that
@@ -117,7 +117,7 @@
PARROT_CANNOT_RETURN_NULL
PMC *
Parrot_io_open(PARROT_INTERP, ARGIN_NULLOK(PMC *pmc),
- ARGIN_NULLOK(STRING *path), ARGIN_NULLOK(STRING *mode))
+ ARGIN_NULLOK(const STRING *path), ARGIN_NULLOK(const STRING *mode))
{
ASSERT_ARGS(Parrot_io_open)
PMC *new_filehandle, *filehandle;
@@ -157,8 +157,8 @@
/*
-=item C<PMC * Parrot_io_fdopen(PARROT_INTERP, PMC *pmc, PIOHANDLE fd, STRING
-*sflags)>
+=item C<PMC * Parrot_io_fdopen(PARROT_INTERP, PMC *pmc, PIOHANDLE fd, const
+STRING *sflags)>
Creates and returns a C<FileHandle> PMC for a given set of flags on an
existing, open file descriptor.
@@ -175,7 +175,7 @@
PARROT_CANNOT_RETURN_NULL
PMC *
Parrot_io_fdopen(PARROT_INTERP, ARGIN_NULLOK(PMC *pmc), PIOHANDLE fd,
- ARGIN(STRING *sflags))
+ ARGIN(const STRING *sflags))
{
ASSERT_ARGS(Parrot_io_fdopen)
PMC *new_filehandle;
@@ -601,7 +601,7 @@
/*
-=item C<INTVAL Parrot_io_putps(PARROT_INTERP, PMC *pmc, STRING *s)>
+=item C<INTVAL Parrot_io_putps(PARROT_INTERP, PMC *pmc, const STRING *s)>
Writes C<*s> to C<*pmc>. Parrot string version. Calls the C<puts> method
on the filehandle PMC.
@@ -612,7 +612,7 @@
PARROT_EXPORT
INTVAL
-Parrot_io_putps(PARROT_INTERP, ARGMOD(PMC *pmc), ARGMOD_NULLOK(STRING *s))
+Parrot_io_putps(PARROT_INTERP, ARGMOD(PMC *pmc), ARGMOD_NULLOK(const STRING *s))
{
ASSERT_ARGS(Parrot_io_putps)
INTVAL result;
More information about the parrot-commits
mailing list