diff --git a/libr/include/r_list.h b/libr/include/r_list.h index 11ffec23d6..c5fc0f7db5 100644 --- a/libr/include/r_list.h +++ b/libr/include/r_list.h @@ -55,6 +55,7 @@ typedef struct r_oflist_t { #define r_list_iter_free(x) x #endif R_API RList *r_list_new(); +//R_API void r_list_iter_free (RListIter *x); R_API RListIter *r_list_iter_get_next(RListIter *list); R_API void *r_list_iter_get_data(RListIter *list); R_API RListIter *r_list_append(RList *list, void *data); diff --git a/libr/util/list.c b/libr/util/list.c index b313f5c6e5..adcdb8ba4b 100644 --- a/libr/util/list.c +++ b/libr/util/list.c @@ -10,6 +10,10 @@ inline RListIter *r_list_iter_new () { return malloc (sizeof (RListIter)); } +void r_list_iter_free (RListIter *list) { + /* do nothing? */ +} + RListIter *r_list_iter_get_next(RListIter *list) { return list->n; } diff --git a/r2-bindings/configure b/r2-bindings/configure index aa94c58153..3742219673 100755 --- a/r2-bindings/configure +++ b/r2-bindings/configure @@ -141,7 +141,7 @@ System types: EOF2 printf "\nOptional Features: - --disable-devel Enable development mode (use valabind and swig) + --disable-devel development mode (use valabind and swig) --with-cc Define C compiler to use (gcc by default) (USERCC=gcc) --with-cxx Define C++ compiler to use (g++ by default) (USERCXX=g++) --with-ostype Choose OS type (gnulinux windows darwin) (USEROSTYPE=auto)\n" diff --git a/r2-bindings/configure.acr b/r2-bindings/configure.acr index 72ca0a07dd..86db4cc9c6 100644 --- a/r2-bindings/configure.acr +++ b/r2-bindings/configure.acr @@ -8,7 +8,7 @@ CHKPRG VALABIND valabind CHKPRG SWIG swig CHKPRG GIRCOMPILER g-ir-compiler -ARG_DISABLE DEVEL_MODE devel Enable development mode (use valabind and swig) ; +ARG_DISABLE DEVEL_MODE devel development mode (use valabind and swig) ; ARG_WITH USERCC=gcc cc Define C compiler to use (gcc by default) ; ARG_WITH USERCXX=g++ cxx Define C++ compiler to use (g++ by default) ; ARG_WITH USEROSTYPE=auto ostype Choose OS type (gnulinux windows darwin) ; diff --git a/r2-bindings/node-ffi/Makefile b/r2-bindings/node-ffi/Makefile index d4978b731b..31cd6e3325 100644 --- a/r2-bindings/node-ffi/Makefile +++ b/r2-bindings/node-ffi/Makefile @@ -1,4 +1,5 @@ LANG=node-ffi +MODVER=$(shell node -e 'console.log(JSON.parse(require("fs").readFileSync("package.json"))["version"])') LANG_EXT=js LIBS_PFX= FORCE_SOEXT=1 @@ -12,6 +13,10 @@ include ../rules.mk node_modules: npm install -npm: clean +npm publish: clean ${MAKE} npm publish + +unpublish: clean + ${MAKE} + npm unpublish @${MODVER} diff --git a/r2-bindings/node-ffi/package.json b/r2-bindings/node-ffi/package.json index 9ce3efc6bc..ab8c4222cf 100644 --- a/r2-bindings/node-ffi/package.json +++ b/r2-bindings/node-ffi/package.json @@ -1,5 +1,5 @@ { "name": "radare2.js", - "version": "0.1.1", + "version": "0.1.2", "url": "http://www.radare.org", "description": "radare2 valabind-ffi bindings for nodejs", "dependencies": { diff --git a/r2-bindings/vapi/r_anal.vapi b/r2-bindings/vapi/r_anal.vapi index 6c691c21a8..dabe26ad09 100644 --- a/r2-bindings/vapi/r_anal.vapi +++ b/r2-bindings/vapi/r_anal.vapi @@ -65,6 +65,7 @@ namespace Radare { LT } +/* [CCode (cname="int", cprefix="R_ANAL_VAR_TYPE_")] public enum VarClass { NULL, @@ -73,6 +74,7 @@ namespace Radare { ARG, ARGREG } +*/ [CCode (cname="int", cprefix="R_ANAL_FCN_TYPE_")] public enum FunctionType { diff --git a/r2-bindings/vapi/r_util.vapi b/r2-bindings/vapi/r_util.vapi index 95236d217e..4065a4593c 100644 --- a/r2-bindings/vapi/r_util.vapi +++ b/r2-bindings/vapi/r_util.vapi @@ -33,7 +33,7 @@ namespace Radare { public static int hash(string str); public static int write(int fd, string str); public static int rwx(string str); - public static void subchr(ref string str, int a, int b); + public static int replace_char (ref string str, int a, int b); //public static string @bool(bool b); public static int ansi_len(string str); public static int ansi_filter(ref string str, int len); @@ -50,7 +50,7 @@ namespace Radare { public static int dump(string file, uint8 *buf, int len); public static unowned string basename (string path); public static string abspath(string path); - public static bool exist (string file); + public static bool exists (string file); public static bool slurp_line (string file, int line, int ctx); }