From 05a278b4cdc8456580e51055ccb89fe4d1cd46ed Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 18 Apr 2009 14:10:06 +0000 Subject: * ext/readline/readline.c: use rb_f_notimplement for methods not implemented. * ext/openssl/ossl_engine.c: ditto. * ext/openssl/ossl_config.c: ditto. * ext/openssl/ossl_cipher.c: ditto. * ext/openssl/ossl_pkcs5.c: ditto. * ext/openssl/ossl_x509ext.c: ditto. * ext/socket/socket.c: ditto. * ext/socket/basicsocket.c: ditto. * ext/socket/ancdata.c: ditto. * ext/socket/unixsocket.c: ditto. * ext/iconv/iconv.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/openssl/ossl_cipher.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ext/openssl/ossl_cipher.c') diff --git a/ext/openssl/ossl_cipher.c b/ext/openssl/ossl_cipher.c index 27d152a61a..df7856b6f0 100644 --- a/ext/openssl/ossl_cipher.c +++ b/ext/openssl/ossl_cipher.c @@ -133,6 +133,7 @@ add_cipher_name_to_ary(const OBJ_NAME *name, VALUE ary) } #endif +#ifdef HAVE_OBJ_NAME_DO_ALL_SORTED /* * call-seq: * Cipher.ciphers -> array[string...] @@ -142,7 +143,6 @@ add_cipher_name_to_ary(const OBJ_NAME *name, VALUE ary) static VALUE ossl_s_ciphers(VALUE self) { -#ifdef HAVE_OBJ_NAME_DO_ALL_SORTED VALUE ary; ary = rb_ary_new(); @@ -151,10 +151,10 @@ ossl_s_ciphers(VALUE self) (void*)ary); return ary; +} #else - rb_notimplement(); +#define ossl_s_ciphers rb_f_notimplement #endif -} /* * call-seq: @@ -453,6 +453,7 @@ ossl_cipher_set_key_length(VALUE self, VALUE key_length) return key_length; } +#if defined(HAVE_EVP_CIPHER_CTX_SET_PADDING) /* * call-seq: * cipher.padding = integer -> integer @@ -466,18 +467,17 @@ ossl_cipher_set_key_length(VALUE self, VALUE key_length) static VALUE ossl_cipher_set_padding(VALUE self, VALUE padding) { -#if defined(HAVE_EVP_CIPHER_CTX_SET_PADDING) EVP_CIPHER_CTX *ctx; int pad = NUM2INT(padding); GetCipher(self, ctx); if (EVP_CIPHER_CTX_set_padding(ctx, pad) != 1) ossl_raise(eCipherError, NULL); -#else - rb_notimplement(); -#endif return padding; } +#else +#define ossl_cipher_set_padding rb_f_notimplement +#endif #define CIPHER_0ARG_INT(func) \ static VALUE \ -- cgit v1.2.3