From e1391cf65c56ca86030b93375c448b91985dfb7c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 9 Feb 2014 07:42:15 +0000 Subject: [PATCH] deprecate and remove docs for IO::Splice::WAITALL 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 -- 2.11.4.GIT