io_splice RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: ruby.io.splice@librelist.org
Subject: [PATCH] deprecate and remove docs for IO::Splice::WAITALL
Date: Sun, 9 Feb 2014 07:44:04 +0000	[thread overview]
Message-ID: <20140209074404.GA22202@dcvr.yhbt.net> (raw)
In-Reply-To: <20140209074404.GA22202@dcvr.yhbt.net>

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



           reply	other threads:[~2014-02-09  7:44 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20140209074404.GA22202@dcvr.yhbt.net>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/ruby_io_splice/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140209074404.GA22202@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=ruby.io.splice@librelist.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/ruby_io_splice.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).