void DH_Destroy_IMP(DirHandle *self) { DirHandleIVARS *const ivars = DH_IVARS(self); DH_Close(self); DECREF(ivars->dir); DECREF(ivars->entry); SUPER_DESTROY(self, DIRHANDLE); }
DirHandle* DH_init(DirHandle *self, String *dir) { DirHandleIVARS *const ivars = DH_IVARS(self); ivars->dir = Str_Clone(dir); ivars->entry = NULL; ABSTRACT_CLASS_CHECK(self, DIRHANDLE); return self; }
DirHandle* DH_init(DirHandle *self, const CharBuf *dir) { DirHandleIVARS *const ivars = DH_IVARS(self); ivars->dir = CB_Clone(dir); ivars->entry = CB_new(32); ABSTRACT_CLASS_CHECK(self, DIRHANDLE); return self; }
String* DH_Get_Entry_IMP(DirHandle *self) { String *entry = DH_IVARS(self)->entry; return (String*)INCREF(entry); }
String* DH_Get_Dir_IMP(DirHandle *self) { return DH_IVARS(self)->dir; }
CharBuf* DH_get_entry(DirHandle *self) { return DH_IVARS(self)->entry; }
CharBuf* DH_get_dir(DirHandle *self) { return DH_IVARS(self)->dir; }