aboutsummaryrefslogtreecommitdiffstats
path: root/ext/zlib
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-15 04:30:37 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-15 04:30:37 +0000
commitb6c604d757d67085c5b2cfb7e38ebebfa6d9aa63 (patch)
treea0014d723211d76cff25ddfbafbbfa61d04a98c0 /ext/zlib
parent72282ab1e2a9c85b0c38e1e78c50fe8ea2f138ed (diff)
downloadruby-b6c604d757d67085c5b2cfb7e38ebebfa6d9aa63.tar.gz
* ext/zlib/zlib.c (Init_zlib): Added Zlib::TEXT and note that
Zlib::ASCII is deprecated in zlib 1.2.3 and newer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/zlib')
-rw-r--r--ext/zlib/zlib.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 53389ab7a7..82a198f19f 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -4057,9 +4057,19 @@ Init_zlib()
/* Represents text data as guessed by deflate.
*
+ * NOTE: The underlying constant Z_ASCII was deprecated in favor of Z_TEXT
+ * in zlib 1.2.2. New applications should not use this constant.
+ *
* See Zlib::Deflate#data_type. */
rb_define_const(mZlib, "ASCII", INT2FIX(Z_ASCII));
+#ifdef Z_TEXT
+ /* Represents text data as guessed by deflate.
+ *
+ * See Zlib::Deflate#data_type. */
+ rb_define_const(mZlib, "TEXT", INT2FIX(Z_TEXT));
+#endif
+
/* Represents an unknown data type as guessed by deflate.
*
* See Zlib::Deflate#data_type. */