R_API RBinPEObj* PE_(r_bin_pe_new_buf)(RBuffer *buf, bool verbose) {
	RBinPEObj *pe = R_NEW0 (RBinPEObj);
	if (!pe) {
		return NULL;
	}
	pe->kv = sdb_new0 ();
	pe->b = r_buf_ref (buf);
	pe->verbose = verbose;
	pe->size = r_buf_size (buf);
	if (!bin_pe_init (pe)) {
		return PE_(r_bin_pe_free)(pe);
	}
	return pe;
}
R_API RBinPEObj* PE_(r_bin_pe_new_buf)(RBuffer *buf, bool verbose) {
	RBinPEObj *pe = R_NEW0 (RBinPEObj);
	if (!pe) {
		return NULL;
	}
	pe->kv = sdb_new0 ();
	pe->b = r_buf_ref (buf);
	pe->verbose = verbose;
	pe->size = r_buf_size (buf);
	if (!bin_pe_init (pe)) {
		return PE_(r_bin_pe_free)(pe);
	}
	return pe;
}