method

empty?

Importance_0
v1_9_3_125 - Show latest stable - 0 notes - Class: SDBM
empty?() public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
static VALUE
fsdbm_empty_p(VALUE obj)
{
    datum key;
    struct dbmdata *dbmp;
    DBM *dbm;
    int i = 0;

    GetDBM(obj, dbmp);
    if (dbmp->di_size < 0) {
        dbm = dbmp->di_dbm;

        for (key = sdbm_firstkey(dbm); key.dptr; key = sdbm_nextkey(dbm)) {
            i++;
        }
    }
    else {
        i = dbmp->di_size;
    }
    if (i == 0) return Qtrue;
    return Qfalse;
}
Register or log in to add new notes.