diff options
-rw-r--r-- | binding.gyp | 11 | ||||
-rw-r--r-- | pikul.i | 8 |
2 files changed, 15 insertions, 4 deletions
diff --git a/binding.gyp b/binding.gyp index 76c29ef..32867c4 100644 --- a/binding.gyp +++ b/binding.gyp @@ -2,7 +2,11 @@ "targets": [ { "target_name": "pikul", - "sources": [ "pikul.c", "pikul_wrap.cxx" ], + "sources": [ + "pikul.c", + "anteraja.c", + "pikul_wrap.cxx" + ], "conditions": [ ['OS=="freebsd"', { "include_dirs": [ @@ -18,6 +22,11 @@ ] } ] + ], + "ldflags": [ + "-L/usr/local/lib", + "-lcurl", + "-ljson-c" ] } ] @@ -3,8 +3,12 @@ #include "pikul.h" %} -#ifdef SWIGPERL +#ifdef SWIGJAVASCRIPT +%include "carrays.i" +%array_functions(char *, stringArray); +#endif +#ifdef SWIGPERL %typemap(in) char *[] { AV *tempav = (AV *)SvRV($input); I32 len = av_len(tempav); @@ -19,7 +23,6 @@ %typemap(freearg) char *[] { free($1); } - %typemap(in) char **[] { AV *items = (AV *)SvRV($input); I32 nitems_min1 = av_len(items); @@ -42,7 +45,6 @@ %typemap(freearg) char **[] { free($1); } - #endif %rename("%(strip:[pikul_])s") ""; |