summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_cipher.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/ossl_cipher.c')
-rw-r--r--ext/openssl/ossl_cipher.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/ext/openssl/ossl_cipher.c b/ext/openssl/ossl_cipher.c
index 72eaa3f31d..3e92d65668 100644
--- a/ext/openssl/ossl_cipher.c
+++ b/ext/openssl/ossl_cipher.c
@@ -10,8 +10,8 @@
*/
#include "ossl.h"
-#define WrapCipher(obj, klass, ctx) \
- (obj) = TypedData_Wrap_Struct((klass), &ossl_cipher_type, (ctx))
+#define NewCipher(klass) \
+ TypedData_Wrap_Struct((klass), &ossl_cipher_type, 0)
#define MakeCipher(obj, klass, ctx) \
(obj) = TypedData_Make_Struct((klass), EVP_CIPHER_CTX, &ossl_cipher_type, (ctx))
#define AllocCipher(obj, ctx) \
@@ -98,11 +98,7 @@ ossl_cipher_memsize(const void *ptr)
static VALUE
ossl_cipher_alloc(VALUE klass)
{
- VALUE obj;
-
- WrapCipher(obj, klass, 0);
-
- return obj;
+ return NewCipher(klass);
}
/*