Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

Data Structures | Macros | Functions
dbm.c File Reference
`#include "ruby.h"`
`#include <fcntl.h>`
`#include <errno.h>`

Go to the source code of this file.

## Data Structures
struct | dbmdata

## Macros
#define | DSIZE_TYPE TYPEOF_DATUM_DSIZE
#define | RSTRING_DSIZE(s) RSTRING_LENINT(s)
#define | TOO_LONG(n) ((long)(+(DSIZE_TYPE)(n)) != (n))
#define | RUBY_DBM_RW_BIT 0x20000000
#define | GetDBM(obj, dbmp)
#define | GetDBM2(obj, dbmp, dbm)
#define | O_CLOEXEC 0

## Functions
| NORETURN (static void closed_dbm(void))
void | Init_dbm (void)

## Macro Definition Documentation

## ◆ DSIZE_TYPE

#define DSIZE_TYPE TYPEOF_DATUM_DSIZE

Definition at line 24 of file dbm.c.

## ◆ GetDBM

#define GetDBM | ( |  | obj,
|  |  | dbmp
| ) |  |

Value:
do {\
TypedData_Get_Struct((obj), struct dbmdata, &dbm_type, (dbmp));\
if ((dbmp)->di_dbm == 0) closed_dbm();\
} while (0)

Definition at line 50 of file dbm.c.

## ◆ GetDBM2

#define GetDBM2 | ( |  | obj,
|  |  | dbmp,
|  |  | dbm
| ) |  |

Value:
do {\
GetDBM((obj), (dbmp));\
(dbm) = (dbmp)->di_dbm;\
} while (0)

Definition at line 55 of file dbm.c.

## ◆ O_CLOEXEC

#define O_CLOEXEC 0

## ◆ RSTRING_DSIZE

#define RSTRING_DSIZE | ( |  | s | ) | RSTRING_LENINT(s)

Definition at line 29 of file dbm.c.

## ◆ RUBY_DBM_RW_BIT

#define RUBY_DBM_RW_BIT 0x20000000

Definition at line 35 of file dbm.c.

## ◆ TOO_LONG

#define TOO_LONG | ( |  | n | ) | ((long)(+(DSIZE_TYPE)(n)) != (n))

Definition at line 30 of file dbm.c.

## Function Documentation

## ◆ Init_dbm()

void Init_dbm | ( | void |  | ) |

Definition at line 1041 of file dbm.c.

## ◆ NORETURN()

NORETURN | ( | static void | closed_dbmvoid | ) |

obj
const VALUE VALUE obj
Definition: rb_mjit_min_header-2.7.0.h:5742
dbmdata
Definition: dbm.c:37