Skip to content

dist/IO.xs remove a dTHX call #23208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: blead
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dist/IO/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
IO 1.56
* A very minor optimization was done in perl's emulated poll() on the OSes
that use need that use Perl's implementation.
Comment on lines +2 to +3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"that use need that use"

extra words, I think


IO 1.55
* XS changes for getline/getlines to support reference counted stacks
* moved the binmode method from IO::File to IO::Handle, since all types
Expand Down
2 changes: 1 addition & 1 deletion dist/IO/IO.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use Carp;
use strict;
use warnings;

our $VERSION = "1.55";
our $VERSION = "1.56";
XSLoader::load 'IO', $VERSION;

sub import {
Expand Down
8 changes: 7 additions & 1 deletion dist/IO/poll.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*
*/

#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
Expand Down Expand Up @@ -40,8 +41,13 @@

# define POLL_EVENTS_MASK (POLL_CAN_READ | POLL_CAN_WRITE | POLL_HAS_EXCP)

#if defined(PERL_IMPLICIT_SYS)
int
poll(struct pollfd *fds, unsigned long nfds, int timeout)
Perl_my_poll_cxt(pTHX_ struct pollfd *fds, unsigned long nfds, int timeout)
#else
int
Perl_my_poll(struct pollfd *fds, unsigned long nfds, int timeout)
#endif
{
int i,err;
fd_set rfd,wfd,efd,ifd;
Expand Down
13 changes: 11 additions & 2 deletions dist/IO/poll.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@
#ifdef poll
# undef poll
#endif
#define poll Perl_my_poll

#if defined(PERL_IMPLICIT_SYS)
# define poll(_fds, _nfds, _tm) Perl_my_poll_cxt(aTHX_ _fds, _nfds, _tm)
#else
# define poll Perl_my_poll
#endif

#if WINVER < 0x0600
typedef struct pollfd {
Expand All @@ -55,7 +60,11 @@ typedef struct pollfd {

#endif

int poll (struct pollfd *, unsigned long, int);
#if defined(PERL_IMPLICIT_SYS)
int Perl_my_poll_cxt(pTHX_ struct pollfd *, unsigned long, int);
#else
int Perl_my_poll(struct pollfd *, unsigned long, int);
#endif

#ifndef HAS_POLL
# define HAS_POLL
Expand Down
Loading