Skip to content

Commit

Permalink
Fixes to make RBin/RIO more consistent for bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed May 28, 2014
1 parent 6266fc6 commit d65700d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions libr/Makefile
Expand Up @@ -10,8 +10,8 @@ PWD=$(shell pwd)

LIBS0=util hash
LIBS1=reg cons db magic diff bp search config socket
LIBS2=syscall lang io crypto flags bin
LIBS3=fs anal
LIBS2=syscall lang io crypto flags
LIBS3=fs anal bin
LIBS4=parse
LIBS5=asm debug
LIBS6=egg
Expand Down
2 changes: 1 addition & 1 deletion libr/bin/Makefile
Expand Up @@ -2,7 +2,7 @@ include ../config.mk
include ../../global.mk

NAME=r_bin
DEPS=r_util r_db
DEPS=r_util r_db r_io

.PHONY: pre

Expand Down
4 changes: 3 additions & 1 deletion libr/bin/bin.c
Expand Up @@ -49,7 +49,9 @@ static int getoffset (RBin *bin, int type, int idx);
static const char *getname (RBin *bin, int off);
static int r_bin_file_object_add (RBinFile *binfile, RBinObject *o);


R_API void r_bin_iobind(RBin *bin, RIO *io) {
r_io_bind (io, &bin->iob);
}

// TODO: move these two function do a different file
R_API RBinXtrData * r_bin_xtrdata_new (void *xtr_obj, FREE_XTR free_xtr, RBuffer *buf, ut64 offset, ut64 size, ut32 file_count) {
Expand Down
2 changes: 1 addition & 1 deletion libr/core/file.c
Expand Up @@ -602,7 +602,7 @@ R_API RCoreFile *r_core_file_open(RCore *r, const char *file, int mode, ut64 loa

fh = R_NEW0 (RCoreFile);
if (!fh) {
eprintf ("file.c:r_core_open failed to allocate RCoreFile.\n");
eprintf ("core/file.c: r_core_open failed to allocate RCoreFile.\n");
//r_io_close (r->io, fd);
return NULL;
}
Expand Down
1 change: 1 addition & 0 deletions libr/include/r_bin.h
Expand Up @@ -402,6 +402,7 @@ R_API int r_bin_has_dbg_linenums (RBin *bin);
R_API int r_bin_has_dbg_syms (RBin *bin);
R_API int r_bin_has_dbg_relocs (RBin *bin);
R_API RBin* r_bin_new();
R_API void r_bin_iobind(RBin *bin, RIO *io);
R_API RBinFile * r_bin_cur (RBin *bin);
R_API RBinObject * r_bin_cur_object (RBin *bin);
R_API int r_bin_file_set_cur_binfile_obj (RBin * bin, RBinFile *bf, RBinObject *obj);
Expand Down
2 changes: 1 addition & 1 deletion pkgcfg/r_bin.pc.acr
Expand Up @@ -7,5 +7,5 @@ Name: r_bin
Description: radare foundation libraries
Version: @VERSION@
Requires:
Libs: -L${libdir} -lr_bin -lr_util
Libs: -L${libdir} -lr_bin -lr_util -lr_db -lr_io
Cflags: -I${includedir}/libr

0 comments on commit d65700d

Please sign in to comment.