Fix bindings

This commit is contained in:
pancake 2012-09-17 17:49:23 +02:00
parent 29b87d31c9
commit 5eda1f485e
8 changed files with 18 additions and 6 deletions

View File

@ -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);

View File

@ -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;
}

View File

@ -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"

View File

@ -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) ;

View File

@ -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}

View File

@ -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": {

View File

@ -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 {

View File

@ -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);
}