io_splice RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* [PATCH] deprecate and remove docs for IO::Splice::WAITALL
@ 2014-02-09  7:44 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2014-02-09  7:44 UTC (permalink / raw)
  To: ruby.io.splice

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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-02-09  7:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-09  7:44 [PATCH] deprecate and remove docs for IO::Splice::WAITALL Eric Wong

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).