~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to ext/openssl/ossl_x509revoked.c

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2011-09-24 19:16:17 UTC
  • mfrom: (1.1.8 upstream) (13.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110924191617-o1qz4rcmqjot8zuy
Tags: 1.9.3~rc1-1
* New upstream release: 1.9.3 RC1.
  + Includes load.c fixes. Closes: #639959.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $Id: ossl_x509revoked.c 27440 2010-04-22 08:21:01Z nobu $
 
2
 * $Id: ossl_x509revoked.c 31128 2011-03-19 03:30:59Z akr $
3
3
 * 'OpenSSL for Ruby' project
4
4
 * Copyright (C) 2001-2002  Michal Rokos <m.rokos@sh.cvut.cz>
5
5
 * All rights reserved.
11
11
#include "ossl.h"
12
12
 
13
13
#define WrapX509Rev(klass, obj, rev) do { \
14
 
    if (!rev) { \
 
14
    if (!(rev)) { \
15
15
        ossl_raise(rb_eRuntimeError, "REV wasn't initialized!"); \
16
16
    } \
17
 
    obj = Data_Wrap_Struct(klass, 0, X509_REVOKED_free, rev); \
 
17
    (obj) = Data_Wrap_Struct((klass), 0, X509_REVOKED_free, (rev)); \
18
18
} while (0)
19
19
#define GetX509Rev(obj, rev) do { \
20
 
    Data_Get_Struct(obj, X509_REVOKED, rev); \
21
 
    if (!rev) { \
 
20
    Data_Get_Struct((obj), X509_REVOKED, (rev)); \
 
21
    if (!(rev)) { \
22
22
        ossl_raise(rb_eRuntimeError, "REV wasn't initialized!"); \
23
23
    } \
24
24
} while (0)
25
25
#define SafeGetX509Rev(obj, rev) do { \
26
 
    OSSL_Check_Kind(obj, cX509Rev); \
27
 
    GetX509Rev(obj, rev); \
 
26
    OSSL_Check_Kind((obj), cX509Rev); \
 
27
    GetX509Rev((obj), (rev)); \
28
28
} while (0)
29
29
 
30
30
/*