Ruby  2.5.0dev(2017-10-22revision60238)
Macros | Functions | Variables
ossl_engine.c File Reference
#include "ossl.h"

Go to the source code of this file.

Macros

#define NewEngine(klass)   TypedData_Wrap_Struct((klass), &ossl_engine_type, 0)
 
#define SetEngine(obj, engine)
 
#define GetEngine(obj, engine)
 
#define OSSL_ENGINE_LOAD_IF_MATCH(x)
 
#define DefEngineConst(x)   rb_define_const(cEngine, #x, INT2NUM(ENGINE_##x))
 

Functions

void Init_ossl_engine (void)
 

Variables

VALUE cEngine
 
VALUE eEngineError
 

Macro Definition Documentation

◆ DefEngineConst

#define DefEngineConst (   x)    rb_define_const(cEngine, #x, INT2NUM(ENGINE_##x))

Definition at line 512 of file ossl_engine.c.

◆ GetEngine

#define GetEngine (   obj,
  engine 
)
Value:
do { \
TypedData_Get_Struct((obj), ENGINE, &ossl_engine_type, (engine)); \
if (!(engine)) { \
ossl_raise(rb_eRuntimeError, "ENGINE wasn't initialized."); \
} \
} while (0)
VALUE rb_eRuntimeError
Definition: error.c:800

Definition at line 22 of file ossl_engine.c.

◆ NewEngine

#define NewEngine (   klass)    TypedData_Wrap_Struct((klass), &ossl_engine_type, 0)

Definition at line 14 of file ossl_engine.c.

◆ OSSL_ENGINE_LOAD_IF_MATCH

#define OSSL_ENGINE_LOAD_IF_MATCH (   x)
Value:
do{\
if(!strcmp(#x, RSTRING_PTR(name))){\
ENGINE_load_##x();\
return Qtrue;\
}\
}while(0)
#define Qtrue
Definition: ruby.h:437
#define RSTRING_PTR(str)
Definition: ruby.h:975
const char * name
Definition: nkf.c:208

Definition at line 49 of file ossl_engine.c.

◆ SetEngine

#define SetEngine (   obj,
  engine 
)
Value:
do { \
if (!(engine)) { \
ossl_raise(rb_eRuntimeError, "ENGINE wasn't initialized."); \
} \
RTYPEDDATA_DATA(obj) = (engine); \
} while(0)
VALUE rb_eRuntimeError
Definition: error.c:800

Definition at line 16 of file ossl_engine.c.

Function Documentation

◆ Init_ossl_engine()

void Init_ossl_engine ( void  )

Variable Documentation

◆ cEngine

VALUE cEngine

Definition at line 39 of file ossl_engine.c.

Referenced by Init_ossl_engine().

◆ eEngineError

VALUE eEngineError

Definition at line 44 of file ossl_engine.c.

Referenced by Init_ossl_engine().