Skip to content

Commit

Permalink
Changing some variable names from code that I've copied
Browse files Browse the repository at this point in the history
Had to include pcm_socket because it couldn't find macro
PARROT_SOCKET
  • Loading branch information
fernandobrito committed Nov 30, 2010
1 parent 4a7b901 commit b57705c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/io/api.c
Expand Up @@ -32,6 +32,7 @@ a new F<src/io/io_string.c>.
#include "api.str"
#include "pmc/pmc_filehandle.h"
#include "pmc/pmc_stringhandle.h"
#include "pmc/pmc_socket.h"

#include <stdarg.h>

Expand Down Expand Up @@ -220,16 +221,16 @@ Parrot_io_close(PARROT_INTERP, ARGMOD_NULLOK(PMC *pmc))
}
else if (pmc->vtable->base_type == enum_class_Socket) {
result = -1;
if (PARROT_SOCKET(SELF)) {
Parrot_Socket_attributes *data_struct = PARROT_SOCKET(SELF);
if (PARROT_SOCKET(pmc)) {
Parrot_Socket_attributes *data_struct = PARROT_SOCKET(pmc);

if (data_struct->os_handle != PIO_INVALID_HANDLE)
result = Parrot_io_close_piohandle(INTERP, data_struct->os_handle);
result = Parrot_io_close_piohandle(interp, data_struct->os_handle);
data_struct->os_handle = PIO_INVALID_HANDLE;
}
}
else if (pmc->vtable->base_type == enum_class_StringHandle) {
SET_ATTR_read_offset(INTERP, SELF, 0);
SET_ATTR_read_offset(interp, pmc, 0);
result = 0;
}
else
Expand Down

0 comments on commit b57705c

Please sign in to comment.