Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

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(engine_name, 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 526 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)

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 | ( |  | engine_name,
|  |  | x
| ) |  |

Value:
do{\
if(!strcmp(#engine_name, RSTRING_PTR(name))){\
ENGINE_load_##engine_name();\
return Qtrue;\
}\
}while(0)

Definition at line 60 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)

Definition at line 16 of file ossl_engine.c.

## Function Documentation

## ◆ Init_ossl_engine()

void Init_ossl_engine | ( | void |  | ) |

Definition at line 529 of file ossl_engine.c.

References cEngine, eEngineError, eOSSLError, mOSSL, rb_cObject, rb_define_class_under(), rb_define_module(), rb_define_singleton_method(), rb_eStandardError, and rb_undef_alloc_func().

## 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().

RSTRING_PTR
#define RSTRING_PTR(str)
Definition: ruby.h:1009
obj
const VALUE VALUE obj
Definition: rb_mjit_min_header-2.7.0.h:5742
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:920
strcmp
int strcmp(const char *, const char *)
Qtrue
#define Qtrue
Definition: ruby.h:468
name
const char * name
Definition: nkf.c:208