ruby-changes:18900
From: akr <ko1@a...>
Date: Sun, 20 Feb 2011 19:59:54 +0900 (JST)
Subject: [ruby-changes:18900] Ruby:r30925 (trunk): * ext/openssl/ossl_cipher.c: parenthesize macro arguments.
akr 2011-02-20 19:59:48 +0900 (Sun, 20 Feb 2011) New Revision: 30925 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30925 Log: * ext/openssl/ossl_cipher.c: parenthesize macro arguments. Modified files: trunk/ChangeLog trunk/ext/openssl/ossl_cipher.c Index: ChangeLog =================================================================== --- ChangeLog (revision 30924) +++ ChangeLog (revision 30925) @@ -1,3 +1,7 @@ +Sun Feb 20 19:59:32 2011 Tanaka Akira <akr@f...> + + * ext/openssl/ossl_cipher.c: parenthesize macro arguments. + Sun Feb 20 16:26:45 2011 Nobuyoshi Nakada <nobu@r...> * thread.c (exec_recursive): prevent temporary objects from GC. Index: ext/openssl/ossl_cipher.c =================================================================== --- ext/openssl/ossl_cipher.c (revision 30924) +++ ext/openssl/ossl_cipher.c (revision 30925) @@ -11,23 +11,23 @@ #include "ossl.h" #define WrapCipher(obj, klass, ctx) \ - obj = Data_Wrap_Struct(klass, 0, ossl_cipher_free, ctx) + (obj) = Data_Wrap_Struct((klass), 0, ossl_cipher_free, (ctx)) #define MakeCipher(obj, klass, ctx) \ - obj = Data_Make_Struct(klass, EVP_CIPHER_CTX, 0, ossl_cipher_free, ctx) + (obj) = Data_Make_Struct((klass), EVP_CIPHER_CTX, 0, ossl_cipher_free, (ctx)) #define AllocCipher(obj, ctx) \ memset(DATA_PTR(obj) = (ctx) = ALLOC(EVP_CIPHER_CTX), 0, sizeof(EVP_CIPHER_CTX)) #define GetCipherInit(obj, ctx) do { \ - Data_Get_Struct(obj, EVP_CIPHER_CTX, ctx); \ + Data_Get_Struct((obj), EVP_CIPHER_CTX, (ctx)); \ } while (0) #define GetCipher(obj, ctx) do { \ - GetCipherInit(obj, ctx); \ - if (!ctx) { \ + GetCipherInit((obj), (ctx)); \ + if (!(ctx)) { \ ossl_raise(rb_eRuntimeError, "Cipher not inititalized!"); \ } \ } while (0) #define SafeGetCipher(obj, ctx) do { \ - OSSL_Check_Kind(obj, cCipher); \ - GetCipher(obj, ctx); \ + OSSL_Check_Kind((obj), cCipher); \ + GetCipher((obj), (ctx)); \ } while (0) /* -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/