mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/openssl/ossl_x509name.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2d5c21403c
commit
05529fa1cb
2 changed files with 11 additions and 7 deletions
|
@ -1,3 +1,7 @@
|
|||
Wed Mar 16 08:40:39 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/openssl/ossl_x509name.c: parenthesize macro arguments.
|
||||
|
||||
Wed Mar 16 20:36:56 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/socket/ipsocket.c (init_inetsock_internal): raise an error on
|
||||
|
|
|
@ -11,20 +11,20 @@
|
|||
#include "ossl.h"
|
||||
|
||||
#define WrapX509Name(klass, obj, name) do { \
|
||||
if (!name) { \
|
||||
if (!(name)) { \
|
||||
ossl_raise(rb_eRuntimeError, "Name wasn't initialized."); \
|
||||
} \
|
||||
obj = Data_Wrap_Struct(klass, 0, X509_NAME_free, name); \
|
||||
(obj) = Data_Wrap_Struct((klass), 0, X509_NAME_free, (name)); \
|
||||
} while (0)
|
||||
#define GetX509Name(obj, name) do { \
|
||||
Data_Get_Struct(obj, X509_NAME, name); \
|
||||
if (!name) { \
|
||||
Data_Get_Struct((obj), X509_NAME, (name)); \
|
||||
if (!(name)) { \
|
||||
ossl_raise(rb_eRuntimeError, "Name wasn't initialized."); \
|
||||
} \
|
||||
} while (0)
|
||||
#define SafeGetX509Name(obj, name) do { \
|
||||
OSSL_Check_Kind(obj, cX509Name); \
|
||||
GetX509Name(obj, name); \
|
||||
OSSL_Check_Kind((obj), cX509Name); \
|
||||
GetX509Name((obj), (name)); \
|
||||
} while (0)
|
||||
|
||||
#define OBJECT_TYPE_TEMPLATE \
|
||||
|
@ -89,7 +89,7 @@ ossl_x509name_alloc(VALUE klass)
|
|||
|
||||
static int id_aref;
|
||||
static VALUE ossl_x509name_add_entry(int, VALUE*, VALUE);
|
||||
#define rb_aref(obj, key) rb_funcall(obj, id_aref, 1, key)
|
||||
#define rb_aref(obj, key) rb_funcall((obj), id_aref, 1, (key))
|
||||
|
||||
static VALUE
|
||||
ossl_x509name_init_i(VALUE i, VALUE args)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue