Skip to content

Commit

Permalink
[io] Remove Parrot_io_is_encoding
Browse files Browse the repository at this point in the history
Unneeded after unicode_io merge
  • Loading branch information
nwellnhof committed Jan 6, 2011
1 parent 4bc0723 commit 84f8d95
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
13 changes: 0 additions & 13 deletions include/parrot/io.h
Expand Up @@ -598,15 +598,6 @@ INTVAL Parrot_io_is_closed_filehandle(PARROT_INTERP, ARGIN(const PMC *pmc))
__attribute__nonnull__(1)
__attribute__nonnull__(2);

PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
INTVAL Parrot_io_is_encoding(PARROT_INTERP,
ARGIN(const PMC *filehandle),
ARGIN(STRING *value))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3);

PARROT_EXPORT
void Parrot_io_set_file_position(SHIM_INTERP,
ARGMOD(PMC *filehandle),
Expand Down Expand Up @@ -709,10 +700,6 @@ void Parrot_io_set_buffer_start(SHIM_INTERP,
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc))
#define ASSERT_ARGS_Parrot_io_is_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(filehandle) \
, PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_Parrot_io_set_file_position __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(filehandle))
#define ASSERT_ARGS_Parrot_io_set_file_size __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
Expand Down
33 changes: 0 additions & 33 deletions src/io/filehandle.c
Expand Up @@ -568,39 +568,6 @@ Parrot_io_set_file_position(SHIM_INTERP, ARGMOD(PMC *filehandle), PIOOFF_T file_

/*
=item C<INTVAL Parrot_io_is_encoding(PARROT_INTERP, const PMC *filehandle,
STRING *value)>
Check whether the encoding attribute of the filehandle matches a passed in
string.
Currently, this pokes directly into the C struct of the FileHandle PMC. This
needs to change to a general interface that can be used by all subclasses and
polymorphic equivalents of FileHandle. For now, hiding it behind a function, so
it can be cleanly changed later.
=cut
*/

PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
INTVAL
Parrot_io_is_encoding(PARROT_INTERP, ARGIN(const PMC *filehandle), ARGIN(STRING *value))
{
ASSERT_ARGS(Parrot_io_is_encoding)
Parrot_FileHandle_attributes * const handle_struct = PARROT_FILEHANDLE(filehandle);
if (STRING_IS_NULL(handle_struct->encoding))
return 0;

if (STRING_equal(interp, value, handle_struct->encoding))
return 1;

return 0;
}

/*
=item C<INTVAL Parrot_io_close_filehandle(PARROT_INTERP, PMC *pmc)>
Flushes and closes the C<FileHandle> PMC C<*pmc>, but leaves the object intact
Expand Down

0 comments on commit 84f8d95

Please sign in to comment.