From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS47066 71.19.144.0/20 X-Spam-Status: No, score=-1.9 required=3.0 tests=AWL,BAYES_00, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.io-splice.general Subject: [PATCH] deprecate and remove docs for IO::Splice::WAITALL Date: Sun, 9 Feb 2014 07:44:04 +0000 Message-ID: <20140209074404.GA22202@dcvr.yhbt.net> References: <20140209074404.GA22202@dcvr.yhbt.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1391931856 28669 80.91.229.3 (9 Feb 2014 07:44:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Feb 2014 07:44:16 +0000 (UTC) To: ruby.io.splice@librelist.org Original-X-From: ruby.io.splice@librelist.org Sun Feb 09 08:44:24 2014 Return-path: Envelope-to: gclrig-ruby.io.splice@m.gmane.org In-Reply-To: <20140209074404.GA22202@dcvr.yhbt.net> List-Archive: List-Help: List-Id: List-Post: List-Subscribe: List-Unsubscribe: Precedence: list Original-Sender: ruby.io.splice@librelist.org Xref: news.gmane.org gmane.comp.lang.ruby.io-splice.general:49 Archived-At: Received: from zedshaw2.xen.prgmr.com ([71.19.156.177]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WCP3t-0004Qd-2r for gclrig-ruby.io.splice@m.gmane.org; Sun, 09 Feb 2014 08:44:21 +0100 Received: from zedshaw2.xen.prgmr.com (unknown [IPv6:::1]) by zedshaw2.xen.prgmr.com (Postfix) with ESMTP id C2DEC7513A for ; Sun, 9 Feb 2014 07:52:53 +0000 (UTC) This functionality should not be implemented in Ruby, at least. This flag could also conflict with future flags used by the underlying syscalls. --- ext/io_splice/io_splice_ext.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ext/io_splice/io_splice_ext.c b/ext/io_splice/io_splice_ext.c index cad5dd1..f4745ac 100644 --- a/ext/io_splice/io_splice_ext.c +++ b/ext/io_splice/io_splice_ext.c @@ -216,7 +216,6 @@ static ssize_t do_splice(int argc, VALUE *argv, unsigned dflags) * * IO::Splice::F_MOVE * * IO::Splice::F_NONBLOCK * * IO::Splice::F_MORE - * * IO::Splice::WAITALL * * Returns the number of bytes spliced. * Raises EOFError when +io_in+ has reached end of file. @@ -350,7 +349,6 @@ static ssize_t do_tee(int argc, VALUE *argv, unsigned dflags) * * +flags+ may be zero (the default) or a combination of: * * IO::Splice::F_NONBLOCK - * * IO::Splice::WAITALL * * Other IO::Splice flags are currently unimplemented or have no effect. * @@ -652,6 +650,9 @@ static int can_mod_pipe_size(void) #endif /* ! HAVE_PIPE2 */ } +#define NODOC_CONST(klass,name,value) \ + rb_define_const((klass),(name),(value)) + void Init_io_splice_ext(void) { VALUE mSplice = rb_define_module_under(rb_cIO, "Splice"); @@ -712,7 +713,7 @@ void Init_io_splice_ext(void) * * IO.vmsplice always defaults to this behavior. */ - rb_define_const(mSplice, "WAITALL", UINT2NUM(WAITALL)); + NODOC_CONST(mSplice, "WAITALL", UINT2NUM(WAITALL)); /* * The maximum size of an atomic write to a pipe -- EW