if (castas == PHP_STREAM_AS_STDIO) {
if (stream->stdiocast) {
if (ret) {
- *ret = stream->stdiocast;
+ *(FILE**)ret = stream->stdiocast;
}
goto exit_success;
}
if (ret == NULL)
goto exit_success;
- *ret = fopencookie(stream, stream->mode, PHP_STREAM_COOKIE_FUNCTIONS);
+ *(FILE**)ret = fopencookie(stream, stream->mode, PHP_STREAM_COOKIE_FUNCTIONS);
if (*ret != NULL) {
off_t pos;
int retcode = php_stream_cast(newstream, castas | flags, ret, show_err);
if (retcode == SUCCESS)
- rewind((FILE*)*ret);
+ rewind(*(FILE**)ret);
/* do some specialized cleanup */
if ((flags & PHP_STREAM_CAST_RELEASE)) {
}
if (castas == PHP_STREAM_AS_STDIO && ret)
- stream->stdiocast = *ret;
+ stream->stdiocast = *(FILE**)ret;
if (flags & PHP_STREAM_CAST_RELEASE) {
php_stream_free(stream, PHP_STREAM_FREE_CLOSE_CASTED);
switch(castas) {
case PHP_STREAM_AS_STDIO:
if (ret) {
- *ret = fdopen(sock->socket, stream->mode);
+ *(FILE**)ret = fdopen(sock->socket, stream->mode);
if (*ret)
return SUCCESS;
return FAILURE;
case PHP_STREAM_AS_FD:
case PHP_STREAM_AS_SOCKETD:
if (ret)
- *ret = (void*)sock->socket;
+ *(int*)ret = sock->socket;
return SUCCESS;
default:
return FAILURE;