diff --git a/src/main/java/com/frostwire/jlibtorrent/DhtSettings.java b/src/main/java/com/frostwire/jlibtorrent/DhtSettings.java
index c9e88c013..d3264fdbf 100644
--- a/src/main/java/com/frostwire/jlibtorrent/DhtSettings.java
+++ b/src/main/java/com/frostwire/jlibtorrent/DhtSettings.java
@@ -3,12 +3,7 @@
import com.frostwire.jlibtorrent.swig.dht_settings;
/**
- * structure used to hold configuration options for the DHT
- *
- * The ``dht_settings`` struct used to contain a ``service_port`` member to
- * control which port the DHT would listen on and send messages from. This
- * field is deprecated and ignored. libtorrent always tries to open the UDP
- * socket on the same port as the TCP socket.
+ * Structure used to hold configuration options for the DHT.
*
* @author gubatron
* @author aldenml
@@ -21,7 +16,11 @@ public DhtSettings(dht_settings s) {
this.s = s;
}
- public dht_settings getSwig() {
+ public DhtSettings() {
+ this(new dht_settings());
+ }
+
+ public dht_settings swig() {
return s;
}
@@ -118,7 +117,7 @@ public void maxTorrents(int value) {
*
* @return
*/
- public int getMaxDHTItems() {
+ public int getMaxDhtItems() {
return s.getMax_dht_items();
}
@@ -127,7 +126,7 @@ public int getMaxDHTItems() {
*
* @param value
*/
- public void setMaxDHTItems(int value) {
+ public void setMaxDhtItems(int value) {
s.setMax_dht_items(value);
}
diff --git a/src/main/java/com/frostwire/jlibtorrent/Session.java b/src/main/java/com/frostwire/jlibtorrent/Session.java
index 377811db5..545c3359c 100644
--- a/src/main/java/com/frostwire/jlibtorrent/Session.java
+++ b/src/main/java/com/frostwire/jlibtorrent/Session.java
@@ -568,7 +568,7 @@ public List getTorrents() {
// otherwise.
void setDHTSettings(DhtSettings settings) {
- s.set_dht_settings(settings.getSwig());
+ s.set_dht_settings(settings.swig());
}
public boolean isDHTRunning() {
diff --git a/src/main/java/com/frostwire/jlibtorrent/plugins/DhtStorageBase.java b/src/main/java/com/frostwire/jlibtorrent/plugins/DhtStorageBase.java
index 84fce2739..56f5ee8e3 100644
--- a/src/main/java/com/frostwire/jlibtorrent/plugins/DhtStorageBase.java
+++ b/src/main/java/com/frostwire/jlibtorrent/plugins/DhtStorageBase.java
@@ -12,26 +12,25 @@
* @author gubatron
* @author aldenml
*/
-public final class DhtStorageBase implements DhtStorage {
+public class DhtStorageBase implements DhtStorage {
private final Sha1Hash id;
private final DhtSettings settings;
private final Counters counters;
- private final HashMap map;
+ private final HashMap map;
public DhtStorageBase(Sha1Hash id, DhtSettings settings) {
this.id = id;
this.settings = settings;
this.counters = new Counters();
- this.map = new HashMap();
+ this.map = new HashMap();
}
@Override
public boolean getPeers(Sha1Hash infoHash, boolean noseed, boolean scrape, entry peers) {
- String hex = infoHash.toHex();
- TorrentEntry v = map.get(hex);
+ TorrentEntry v = map.get(infoHash);
if (v == null) {
return false;
@@ -47,7 +46,7 @@ public boolean getPeers(Sha1Hash infoHash, boolean noseed, boolean scrape, entry
for (PeerEntry peer : v.peers) {
sha1_hash iphash = new sha1_hash();
- libtorrent.sha1_hash_address(peer.addr.address().swig(), iphash);
+ libtorrent.sha1_hash_address(peer.addr.address(), iphash);
if (peer.seed) {
seeds.set(iphash);
} else {
@@ -68,7 +67,7 @@ public boolean getPeers(Sha1Hash infoHash, boolean noseed, boolean scrape, entry
if ((Math.random() / (Integer.MAX_VALUE + 1.f)) * (num - t) >= num - m) continue;
if (noseed && e.seed) continue;
endpoint.resize(18);
- int n = libtorrent.write_tcp_endpoint(e.addr.swig(), endpoint);
+ int n = libtorrent.write_tcp_endpoint(e.addr, endpoint);
endpoint.resize(n);
pe.push_back(new entry(endpoint));
@@ -81,8 +80,7 @@ public boolean getPeers(Sha1Hash infoHash, boolean noseed, boolean scrape, entry
@Override
public void announcePeer(Sha1Hash infoHash, TcpEndpoint endp, String name, boolean seed) {
- String hex = infoHash.toHex();
- TorrentEntry v = map.get(hex);
+ TorrentEntry v = map.get(infoHash);
if (v == null) {
// we don't have this torrent, add it
// do we need to remove another one first?
@@ -90,13 +88,13 @@ public void announcePeer(Sha1Hash infoHash, TcpEndpoint endp, String name, boole
// we need to remove some. Remove the ones with the
// fewest peers
int num_peers = Integer.MAX_VALUE;
- String candidateKey = null;
- for (Map.Entry kv : map.entrySet()) {
+ Sha1Hash candidateKey = null;
+ for (Map.Entry kv : map.entrySet()) {
if (kv.getValue().peers.size() > num_peers) {
continue;
}
- if (hex.equals(kv.getKey())) {
+ if (infoHash.equals(kv.getKey())) {
continue;
}
num_peers = kv.getValue().peers.size();
@@ -108,7 +106,7 @@ public void announcePeer(Sha1Hash infoHash, TcpEndpoint endp, String name, boole
}
counters.torrents += 1;
v = new TorrentEntry();
- map.put(hex, v);
+ map.put(infoHash, v);
}
// the peer announces a torrent name, and we don't have a name
@@ -122,7 +120,7 @@ public void announcePeer(Sha1Hash infoHash, TcpEndpoint endp, String name, boole
}
PeerEntry peer = new PeerEntry();
- peer.addr = endp;
+ peer.addr = endp.swig();
peer.added = System.currentTimeMillis();
peer.seed = seed;
@@ -184,16 +182,16 @@ public Counters counters() {
static final class PeerEntry {
public long added;
- public TcpEndpoint addr;
+ public tcp_endpoint addr;
public boolean seed;
public static final Comparator COMPARATOR = new Comparator() {
@Override
public int compare(PeerEntry o1, PeerEntry o2) {
- TcpEndpoint a1 = o1.addr;
- TcpEndpoint a2 = o2.addr;
+ tcp_endpoint a1 = o1.addr;
+ tcp_endpoint a2 = o2.addr;
- int r = Address.compare(a1.address(), a2.address());
+ int r = address.compare(a1.address(), a2.address());
return r == 0 ? Integer.compare(a1.port(), a2.port()) : r;
}
diff --git a/src/main/java/com/frostwire/jlibtorrent/swig/entry.java b/src/main/java/com/frostwire/jlibtorrent/swig/entry.java
index fecc199b3..146327061 100644
--- a/src/main/java/com/frostwire/jlibtorrent/swig/entry.java
+++ b/src/main/java/com/frostwire/jlibtorrent/swig/entry.java
@@ -104,14 +104,6 @@ public String to_string() {
return libtorrent_jni.entry_to_string(swigCPtr, this);
}
- public void setM_type_queried(short value) {
- libtorrent_jni.entry_m_type_queried_set(swigCPtr, this, value);
- }
-
- public short getM_type_queried() {
- return libtorrent_jni.entry_m_type_queried_get(swigCPtr, this);
- }
-
public entry(byte_vector string_bytes) {
this(libtorrent_jni.new_entry__SWIG_7(byte_vector.getCPtr(string_bytes), string_bytes), true);
}
@@ -128,7 +120,7 @@ public void set(String key, byte_vector value) {
libtorrent_jni.entry_set__SWIG_1(swigCPtr, this, key, byte_vector.getCPtr(value), value);
}
- public void set(String key, int value) {
+ public void set(String key, long value) {
libtorrent_jni.entry_set__SWIG_2(swigCPtr, this, key, value);
}
diff --git a/src/main/java/com/frostwire/jlibtorrent/swig/libtorrent_jni.java b/src/main/java/com/frostwire/jlibtorrent/swig/libtorrent_jni.java
index 76d40a427..8773db918 100644
--- a/src/main/java/com/frostwire/jlibtorrent/swig/libtorrent_jni.java
+++ b/src/main/java/com/frostwire/jlibtorrent/swig/libtorrent_jni.java
@@ -594,13 +594,11 @@ public class libtorrent_jni {
public final static native void entry_swap(long jarg1, entry jarg1_, long jarg2, entry jarg2_);
public final static native long entry_find_key(long jarg1, entry jarg1_, String jarg2);
public final static native String entry_to_string(long jarg1, entry jarg1_);
- public final static native void entry_m_type_queried_set(long jarg1, entry jarg1_, short jarg2);
- public final static native short entry_m_type_queried_get(long jarg1, entry jarg1_);
public final static native long new_entry__SWIG_7(long jarg1, byte_vector jarg1_);
public final static native long entry_get(long jarg1, entry jarg1_, String jarg2);
public final static native void entry_set__SWIG_0(long jarg1, entry jarg1_, String jarg2, String jarg3);
public final static native void entry_set__SWIG_1(long jarg1, entry jarg1_, String jarg2, long jarg3, byte_vector jarg3_);
- public final static native void entry_set__SWIG_2(long jarg1, entry jarg1_, String jarg2, int jarg3);
+ public final static native void entry_set__SWIG_2(long jarg1, entry jarg1_, String jarg2, long jarg3);
public final static native long entry_string_bytes(long jarg1, entry jarg1_);
public final static native long entry_bencode(long jarg1, entry jarg1_);
public final static native long entry_bdecode(long jarg1, byte_vector jarg1_);
diff --git a/src/test/java/com/frostwire/jlibtorrent/DhtStorageBaseTest.java b/src/test/java/com/frostwire/jlibtorrent/DhtStorageBaseTest.java
new file mode 100644
index 000000000..cb978fe92
--- /dev/null
+++ b/src/test/java/com/frostwire/jlibtorrent/DhtStorageBaseTest.java
@@ -0,0 +1,53 @@
+package com.frostwire.jlibtorrent;
+
+import com.frostwire.jlibtorrent.plugins.DhtStorageBase;
+import com.frostwire.jlibtorrent.swig.entry;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * @author gubatron
+ * @author aldenml
+ */
+public class DhtStorageBaseTest {
+
+ private static final Sha1Hash n1 = new Sha1Hash("5fbfbff10c5d6a4ec8a88e4c6ab4c28b95eee401");
+
+ @Test
+ public void testAnnouncePeer() {
+ DhtSettings sett = testSettings();
+ DhtStorageBase s = new DhtStorageBase(new Sha1Hash(), sett);
+
+ entry peers = new entry();
+ s.getPeers(n1, false, false, peers);
+
+ assertEquals(peers.get("n").type(), entry.data_type.undefined_t);
+ assertEquals(peers.get("values").type(), entry.data_type.undefined_t);
+/*
+ tcp::endpoint p1 = ep("124.31.75.21", 1);
+ tcp::endpoint p2 = ep("124.31.75.22", 1);
+ tcp::endpoint p3 = ep("124.31.75.23", 1);
+ tcp::endpoint p4 = ep("124.31.75.24", 1);
+
+ s->announce_peer(n1, p1, "torrent_name", false);
+ s->get_peers(n1, false, false, peers);
+ TEST_EQUAL(peers["n"].string(), "torrent_name")
+ TEST_EQUAL(peers["values"].list().size(), 1)
+
+ s->announce_peer(n2, p2, "torrent_name1", false);
+ s->announce_peer(n2, p3, "torrent_name1", false);
+ s->announce_peer(n3, p4, "torrent_name2", false);
+ bool r = s->get_peers(n1, false, false, peers);
+ TEST_CHECK(!r);
+ */
+ }
+
+ private static DhtSettings testSettings() {
+ DhtSettings sett = new DhtSettings();
+ sett.maxTorrents(2);
+ sett.setMaxDhtItems(2);
+ sett.itemLifetime(120 * 60);
+ return sett;
+ }
+}
diff --git a/swig/libtorrent.i b/swig/libtorrent.i
index 08f93dbee..93e0c9dc6 100644
--- a/swig/libtorrent.i
+++ b/swig/libtorrent.i
@@ -429,9 +429,8 @@ namespace std {
%ignore libtorrent::entry::find_key(std::string const &) const;
%ignore libtorrent::entry::find_key(char const *);
%ignore libtorrent::entry::find_key(char const *) const;
-%ignore libtorrent::entry::operator [](char const *);
-%ignore libtorrent::entry::operator [](char const *) const;
-%ignore libtorrent::entry::operator [](std::string const &) const;
+%ignore libtorrent::entry::operator [];
+%ignore libtorrent::entry::m_type_queried;
%ignore libtorrent::buffer::data() const;
%ignore libtorrent::buffer::begin() const;
%ignore libtorrent::buffer::end() const;
@@ -931,7 +930,7 @@ namespace libtorrent {
$self->operator[](key) = std::string(value.begin(), value.end());
}
- void set(std::string const& key, long const& value) {
+ void set(std::string const& key, long long const& value) {
$self->operator[](key) = value;
}
diff --git a/swig/libtorrent_jni.cpp b/swig/libtorrent_jni.cpp
index 3e69a2f65..3a411faf0 100644
--- a/swig/libtorrent_jni.cpp
+++ b/swig/libtorrent_jni.cpp
@@ -1238,7 +1238,7 @@ SWIGINTERN void libtorrent_entry_set__SWIG_0(libtorrent::entry *self,std::string
SWIGINTERN void libtorrent_entry_set__SWIG_1(libtorrent::entry *self,std::string const &key,std::vector< int8_t > const &value){
self->operator[](key) = std::string(value.begin(), value.end());
}
-SWIGINTERN void libtorrent_entry_set__SWIG_2(libtorrent::entry *self,std::string const &key,long const &value){
+SWIGINTERN void libtorrent_entry_set__SWIG_2(libtorrent::entry *self,std::string const &key,long long const &value){
self->operator[](key) = value;
}
SWIGINTERN std::vector< int8_t > libtorrent_entry_string_bytes(libtorrent::entry *self){
@@ -17364,34 +17364,6 @@ SWIGEXPORT jstring JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_e
}
-SWIGEXPORT void JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_entry_1m_1type_1queried_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jshort jarg2) {
- libtorrent::entry *arg1 = (libtorrent::entry *) 0 ;
- boost::uint8_t arg2 ;
-
- (void)jenv;
- (void)jcls;
- (void)jarg1_;
- arg1 = *(libtorrent::entry **)&jarg1;
- arg2 = (boost::uint8_t)jarg2;
- if (arg1) (arg1)->m_type_queried = arg2;
-}
-
-
-SWIGEXPORT jshort JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_entry_1m_1type_1queried_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
- jshort jresult = 0 ;
- libtorrent::entry *arg1 = (libtorrent::entry *) 0 ;
- boost::uint8_t result;
-
- (void)jenv;
- (void)jcls;
- (void)jarg1_;
- arg1 = *(libtorrent::entry **)&jarg1;
- result = (boost::uint8_t) ((arg1)->m_type_queried);
- jresult = (jshort)result;
- return jresult;
-}
-
-
SWIGEXPORT jlong JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_new_1entry_1_1SWIG_17(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jlong jresult = 0 ;
std::vector< int8_t > *arg1 = 0 ;
@@ -17527,11 +17499,11 @@ SWIGEXPORT void JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_entr
}
-SWIGEXPORT void JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_entry_1set_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
+SWIGEXPORT void JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_entry_1set_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3) {
libtorrent::entry *arg1 = (libtorrent::entry *) 0 ;
std::string *arg2 = 0 ;
- long *arg3 = 0 ;
- long temp3 ;
+ long long *arg3 = 0 ;
+ long long temp3 ;
(void)jenv;
(void)jcls;
@@ -17546,11 +17518,11 @@ SWIGEXPORT void JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_entr
std::string arg2_str(arg2_pstr);
arg2 = &arg2_str;
jenv->ReleaseStringUTFChars(jarg2, arg2_pstr);
- temp3 = (long)jarg3;
+ temp3 = (long long)jarg3;
arg3 = &temp3;
{
try {
- libtorrent_entry_set__SWIG_2(arg1,(std::string const &)*arg2,(long const &)*arg3);
+ libtorrent_entry_set__SWIG_2(arg1,(std::string const &)*arg2,(long long const &)*arg3);
} catch (std::exception& e) {
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, e.what());
} catch (...) {
@@ -61758,7 +61730,7 @@ SWIGEXPORT jstring JNICALL Java_com_frostwire_jlibtorrent_swig_libtorrent_1jni_J
(void)jenv;
(void)jcls;
- result = (char *)("c49a9f5f50156e2859f6797df6c488994077a0b6");
+ result = (char *)("0bd3ad33ef8676c9dd83235a2af9912d66d73573");
if (result) jresult = jenv->NewStringUTF((const char *)result);
return jresult;
}
diff --git a/swig/libtorrent_node.cpp b/swig/libtorrent_node.cpp
index c5c3b3325..cb63ecb86 100644
--- a/swig/libtorrent_node.cpp
+++ b/swig/libtorrent_node.cpp
@@ -2613,29 +2613,6 @@ int SWIG_AsVal_bool (v8::Handle obj, bool *val)
return SWIG_OK;
}
-
-SWIGINTERN int
-SWIG_AsVal_unsigned_SS_char (v8::Handle obj, unsigned char *val)
-{
- unsigned long v;
- int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
- if (SWIG_IsOK(res)) {
- if ((v > UCHAR_MAX)) {
- return SWIG_OverflowError;
- } else {
- if (val) *val = (unsigned char)(v);
- }
- }
- return res;
-}
-
-
-SWIGINTERNINLINE v8::Handle
-SWIG_From_unsigned_SS_char (unsigned char value)
-{
- return SWIG_From_unsigned_SS_long (value);
-}
-
SWIGINTERN libtorrent::entry *new_libtorrent_entry__SWIG_7(std::vector< int8_t > const &string_bytes){
return new entry(std::string(string_bytes.begin(), string_bytes.end()));
}
@@ -2648,7 +2625,7 @@ SWIGINTERN void libtorrent_entry_set__SWIG_0(libtorrent::entry *self,std::string
SWIGINTERN void libtorrent_entry_set__SWIG_1(libtorrent::entry *self,std::string const &key,std::vector< int8_t > const &value){
self->operator[](key) = std::string(value.begin(), value.end());
}
-SWIGINTERN void libtorrent_entry_set__SWIG_2(libtorrent::entry *self,std::string const &key,long const &value){
+SWIGINTERN void libtorrent_entry_set__SWIG_2(libtorrent::entry *self,std::string const &key,long long const &value){
self->operator[](key) = value;
}
SWIGINTERN std::vector< int8_t > libtorrent_entry_string_bytes(libtorrent::entry *self){
@@ -2687,6 +2664,29 @@ SWIGINTERN bool libtorrent_sha1_hash_from_hex(char *hex,libtorrent::sha1_hash &h
SWIGINTERN int libtorrent_sha1_hash_compare(libtorrent::sha1_hash const &h1,libtorrent::sha1_hash const &h2){
return h1 == h2 ? 0 : (h1 < h2 ? -1 : 1);
}
+
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_char (v8::Handle obj, unsigned char *val)
+{
+ unsigned long v;
+ int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
+ if (SWIG_IsOK(res)) {
+ if ((v > UCHAR_MAX)) {
+ return SWIG_OverflowError;
+ } else {
+ if (val) *val = (unsigned char)(v);
+ }
+ }
+ return res;
+}
+
+
+SWIGINTERNINLINE v8::Handle
+SWIG_From_unsigned_SS_char (unsigned char value)
+{
+ return SWIG_From_unsigned_SS_long (value);
+}
+
SWIGINTERN time_t libtorrent_torrent_info_get_creation_date(libtorrent::torrent_info *self){
return self->creation_date().get_value_or(0);
}
@@ -23365,63 +23365,6 @@ static SwigV8ReturnValue _wrap_entry_to_string(const SwigV8Arguments &args) {
}
-static void _wrap_entry_m_type_queried_set(v8::Local property, v8::Local value,
- const SwigV8PropertyCallbackInfoVoid &info) {
- SWIGV8_HANDLESCOPE();
-
- libtorrent::entry *arg1 = (libtorrent::entry *) 0 ;
- boost::uint8_t arg2 ;
- void *argp1 = 0 ;
- int res1 = 0 ;
- unsigned char val2 ;
- int ecode2 = 0 ;
-
- res1 = SWIG_ConvertPtr(info.Holder(), &argp1,SWIGTYPE_p_libtorrent__entry, 0 | 0 );
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "entry_m_type_queried_set" "', argument " "1"" of type '" "libtorrent::entry *""'");
- }
- arg1 = (libtorrent::entry *)(argp1);
- ecode2 = SWIG_AsVal_unsigned_SS_char(value, &val2);
- if (!SWIG_IsOK(ecode2)) {
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "entry_m_type_queried_set" "', argument " "2"" of type '" "boost::uint8_t""'");
- }
- arg2 = (boost::uint8_t)(val2);
- if (arg1) (arg1)->m_type_queried = arg2;
-
-
-
- goto fail;
-fail:
- return;
-}
-
-
-static SwigV8ReturnValue _wrap_entry_m_type_queried_get(v8::Local property, const SwigV8PropertyCallbackInfo &info) {
- SWIGV8_HANDLESCOPE();
-
- v8::Handle jsresult;
- libtorrent::entry *arg1 = (libtorrent::entry *) 0 ;
- void *argp1 = 0 ;
- int res1 = 0 ;
- boost::uint8_t result;
-
- res1 = SWIG_ConvertPtr(info.Holder(), &argp1,SWIGTYPE_p_libtorrent__entry, 0 | 0 );
- if (!SWIG_IsOK(res1)) {
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "entry_m_type_queried_get" "', argument " "1"" of type '" "libtorrent::entry *""'");
- }
- arg1 = (libtorrent::entry *)(argp1);
- result = (boost::uint8_t) ((arg1)->m_type_queried);
- jsresult = SWIG_From_unsigned_SS_char((unsigned char)(result));
-
-
- SWIGV8_RETURN_INFO(jsresult, info);
-
- goto fail;
-fail:
- SWIGV8_RETURN_INFO(SWIGV8_UNDEFINED(), info);
-}
-
-
static SwigV8ReturnValue _wrap_new_entry__SWIG_7(const SwigV8Arguments &args, V8ErrorHandler &SWIGV8_ErrorHandler) {
SWIGV8_HANDLESCOPE();
@@ -23745,12 +23688,12 @@ static SwigV8ReturnValue _wrap_entry_set__SWIG_2(const SwigV8Arguments &args, V8
v8::Handle jsresult;
libtorrent::entry *arg1 = (libtorrent::entry *) 0 ;
std::string *arg2 = 0 ;
- long *arg3 = 0 ;
+ long long *arg3 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
int res2 = SWIG_OLDOBJ ;
- long temp3 ;
- long val3 ;
+ long long temp3 ;
+ long long val3 ;
int ecode3 = 0 ;
res1 = SWIG_ConvertPtr(args.Holder(), &argp1,SWIGTYPE_p_libtorrent__entry, 0 | 0 );
@@ -23769,13 +23712,13 @@ static SwigV8ReturnValue _wrap_entry_set__SWIG_2(const SwigV8Arguments &args, V8
}
arg2 = ptr;
}
- ecode3 = SWIG_AsVal_long(args[1], &val3);
+ ecode3 = SWIG_AsVal_long_SS_long(args[1], &val3);
if (!SWIG_IsOK(ecode3)) {
- SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "entry_set" "', argument " "3"" of type '" "long""'");
+ SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "entry_set" "', argument " "3"" of type '" "long long""'");
}
- temp3 = (long)(val3);
+ temp3 = (long long)(val3);
arg3 = &temp3;
- libtorrent_entry_set__SWIG_2(arg1,(std::string const &)*arg2,(long const &)*arg3);
+ libtorrent_entry_set__SWIG_2(arg1,(std::string const &)*arg2,(long long const &)*arg3);
jsresult = SWIGV8_UNDEFINED();
if (SWIG_IsNewObj(res2)) delete arg2;
@@ -103962,7 +103905,7 @@ static SwigV8ReturnValue _wrap_JLIBTORRENT_REVISION_SHA1(v8::Local p
v8::Handle jsresult;
- jsresult = SWIG_FromCharPtr((const char *)"c49a9f5f50156e2859f6797df6c488994077a0b6");
+ jsresult = SWIG_FromCharPtr((const char *)"0bd3ad33ef8676c9dd83235a2af9912d66d73573");
SWIGV8_RETURN_INFO(jsresult, info);
@@ -113393,7 +113336,6 @@ SWIGV8_AddMemberFunction(_exports_entry_class, "dict", _wrap_entry_dict);
SWIGV8_AddMemberFunction(_exports_entry_class, "swap", _wrap_entry_swap);
SWIGV8_AddMemberFunction(_exports_entry_class, "find_key", _wrap_entry_find_key);
SWIGV8_AddMemberFunction(_exports_entry_class, "to_string", _wrap_entry_to_string);
-SWIGV8_AddMemberVariable(_exports_entry_class, "m_type_queried", _wrap_entry_m_type_queried_get, _wrap_entry_m_type_queried_set);
SWIGV8_AddMemberFunction(_exports_entry_class, "get", _wrap_entry_get);
SWIGV8_AddMemberFunction(_exports_entry_class, "set", _wrap_entry__wrap_entry_set);
SWIGV8_AddMemberFunction(_exports_entry_class, "string_bytes", _wrap_entry_string_bytes);