Ruby  2.5.0dev(2017-10-22revision60238)
Data Structures | Macros | Functions
gdbm.c File Reference
#include "ruby.h"
#include <gdbm.h>
#include <fcntl.h>
#include <errno.h>

Go to the source code of this file.

Data Structures

struct  dbmdata
 

Macros

#define TOO_LONG(n)   0
 
#define RUBY_GDBM_RW_BIT   0x20000000
 
#define MY_BLOCK_SIZE   (2048)
 
#define MY_FATAL_FUNC   rb_gdbm_fatal
 
#define GetDBM(obj, dbmp)
 
#define GetDBM2(obj, dbmp, dbm)
 

Functions

void Init_gdbm (void)
 

Macro Definition Documentation

◆ 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 103 of file gdbm.c.

◆ GetDBM2

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

Definition at line 109 of file gdbm.c.

◆ MY_BLOCK_SIZE

#define MY_BLOCK_SIZE   (2048)

Definition at line 84 of file gdbm.c.

◆ MY_FATAL_FUNC

#define MY_FATAL_FUNC   rb_gdbm_fatal

Definition at line 85 of file gdbm.c.

◆ RUBY_GDBM_RW_BIT

#define RUBY_GDBM_RW_BIT   0x20000000

Definition at line 82 of file gdbm.c.

◆ TOO_LONG

#define TOO_LONG (   n)    0

Definition at line 79 of file gdbm.c.

Function Documentation

◆ Init_gdbm()

void Init_gdbm ( void  )

Definition at line 1228 of file gdbm.c.