Ruby  2.5.0dev(2017-10-22revision60238)
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

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) == 0) closed_dbm();\
if ((dbmp)->di_dbm == 0) closed_dbm();\
} while (0)
if(len<=MAX_WORD_LENGTH &&len >=MIN_WORD_LENGTH)
Definition: zonetab.h:883
Definition: dbm.c:37

Definition at line 48 of file dbm.c.

◆ GetDBM2

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

Definition at line 54 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 1043 of file dbm.c.