Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using SWIG 4.1.1 #258

Merged
merged 1 commit into from
Oct 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
* update to libtorrent master
* using SWIG 4.1.1
* improved java api layer
* lt:allow to change save path without any additional actions
* lt:allow to change save path without moving any files
Expand Down
18 changes: 15 additions & 3 deletions src/main/java/org/libtorrent4j/swig/add_piece_flags_t.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
*
* Do not make changes to this file unless you know what you are doing--modify
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */

Expand All @@ -21,6 +21,18 @@ protected static long getCPtr(add_piece_flags_t obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}

protected static long swigRelease(add_piece_flags_t obj) {
long ptr = 0;
if (obj != null) {
if (!obj.swigCMemOwn)
throw new RuntimeException("Cannot release ownership as memory is not owned");
ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
obj.delete();
}
return ptr;
}

@SuppressWarnings("deprecation")
protected void finalize() {
delete();
Expand Down
18 changes: 15 additions & 3 deletions src/main/java/org/libtorrent4j/swig/add_torrent_alert.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
*
* Do not make changes to this file unless you know what you are doing--modify
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */

Expand All @@ -20,6 +20,18 @@ protected static long getCPtr(add_torrent_alert obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}

protected static long swigRelease(add_torrent_alert obj) {
long ptr = 0;
if (obj != null) {
if (!obj.swigCMemOwn)
throw new RuntimeException("Cannot release ownership as memory is not owned");
ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
obj.delete();
}
return ptr;
}

@SuppressWarnings("deprecation")
protected void finalize() {
delete();
Expand Down
20 changes: 16 additions & 4 deletions src/main/java/org/libtorrent4j/swig/add_torrent_params.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
*
* Do not make changes to this file unless you know what you are doing--modify
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */

Expand All @@ -21,6 +21,18 @@ protected static long getCPtr(add_torrent_params obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}

protected static long swigRelease(add_torrent_params obj) {
long ptr = 0;
if (obj != null) {
if (!obj.swigCMemOwn)
throw new RuntimeException("Cannot release ownership as memory is not owned");
ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
obj.delete();
}
return ptr;
}

@SuppressWarnings("deprecation")
protected void finalize() {
delete();
Expand All @@ -41,7 +53,7 @@ public add_torrent_params() {
}

public add_torrent_params(add_torrent_params arg0) {
this(libtorrent_jni.new_add_torrent_params__SWIG_1(add_torrent_params.getCPtr(arg0), arg0), true);
this(libtorrent_jni.new_add_torrent_params__SWIG_1(add_torrent_params.swigRelease(arg0), arg0), true);
}

public void setVersion(int value) {
Expand Down
18 changes: 15 additions & 3 deletions src/main/java/org/libtorrent4j/swig/address.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
*
* Do not make changes to this file unless you know what you are doing--modify
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */

Expand All @@ -21,6 +21,18 @@ protected static long getCPtr(address obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}

protected static long swigRelease(address obj) {
long ptr = 0;
if (obj != null) {
if (!obj.swigCMemOwn)
throw new RuntimeException("Cannot release ownership as memory is not owned");
ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
obj.delete();
}
return ptr;
}

@SuppressWarnings("deprecation")
protected void finalize() {
delete();
Expand Down
18 changes: 15 additions & 3 deletions src/main/java/org/libtorrent4j/swig/address_sha1_hash_pair.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
*
* Do not make changes to this file unless you know what you are doing--modify
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */

Expand All @@ -21,6 +21,18 @@ protected static long getCPtr(address_sha1_hash_pair obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}

protected static long swigRelease(address_sha1_hash_pair obj) {
long ptr = 0;
if (obj != null) {
if (!obj.swigCMemOwn)
throw new RuntimeException("Cannot release ownership as memory is not owned");
ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
obj.delete();
}
return ptr;
}

@SuppressWarnings("deprecation")
protected void finalize() {
delete();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
*
* Do not make changes to this file unless you know what you are doing--modify
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */

Expand All @@ -21,6 +21,18 @@ protected static long getCPtr(address_sha1_hash_pair_vector obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}

protected static long swigRelease(address_sha1_hash_pair_vector obj) {
long ptr = 0;
if (obj != null) {
if (!obj.swigCMemOwn)
throw new RuntimeException("Cannot release ownership as memory is not owned");
ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
obj.delete();
}
return ptr;
}

@SuppressWarnings("deprecation")
protected void finalize() {
delete();
Expand Down
18 changes: 15 additions & 3 deletions src/main/java/org/libtorrent4j/swig/alert.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
*
* Do not make changes to this file unless you know what you are doing--modify
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */

Expand All @@ -21,6 +21,18 @@ protected static long getCPtr(alert obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}

protected static long swigRelease(alert obj) {
long ptr = 0;
if (obj != null) {
if (!obj.swigCMemOwn)
throw new RuntimeException("Cannot release ownership as memory is not owned");
ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
obj.delete();
}
return ptr;
}

@SuppressWarnings("deprecation")
protected void finalize() {
delete();
Expand Down
18 changes: 15 additions & 3 deletions src/main/java/org/libtorrent4j/swig/alert_category_t.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
*
* Do not make changes to this file unless you know what you are doing--modify
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */

Expand All @@ -21,6 +21,18 @@ protected static long getCPtr(alert_category_t obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}

protected static long swigRelease(alert_category_t obj) {
long ptr = 0;
if (obj != null) {
if (!obj.swigCMemOwn)
throw new RuntimeException("Cannot release ownership as memory is not owned");
ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
obj.delete();
}
return ptr;
}

@SuppressWarnings("deprecation")
protected void finalize() {
delete();
Expand Down
18 changes: 15 additions & 3 deletions src/main/java/org/libtorrent4j/swig/alert_notify_callback.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
*
* Do not make changes to this file unless you know what you are doing--modify
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */

Expand All @@ -21,6 +21,18 @@ protected static long getCPtr(alert_notify_callback obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}

protected static long swigRelease(alert_notify_callback obj) {
long ptr = 0;
if (obj != null) {
if (!obj.swigCMemOwn)
throw new RuntimeException("Cannot release ownership as memory is not owned");
ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
obj.delete();
}
return ptr;
}

@SuppressWarnings("deprecation")
protected void finalize() {
delete();
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/libtorrent4j/swig/alert_priority.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
*
* Do not make changes to this file unless you know what you are doing--modify
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */

Expand Down
18 changes: 15 additions & 3 deletions src/main/java/org/libtorrent4j/swig/alert_ptr_vector.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
*
* Do not make changes to this file unless you know what you are doing--modify
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */

Expand All @@ -21,6 +21,18 @@ protected static long getCPtr(alert_ptr_vector obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}

protected static long swigRelease(alert_ptr_vector obj) {
long ptr = 0;
if (obj != null) {
if (!obj.swigCMemOwn)
throw new RuntimeException("Cannot release ownership as memory is not owned");
ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
obj.delete();
}
return ptr;
}

@SuppressWarnings("deprecation")
protected void finalize() {
delete();
Expand Down
18 changes: 15 additions & 3 deletions src/main/java/org/libtorrent4j/swig/alerts_dropped_alert.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
*
* Do not make changes to this file unless you know what you are doing--modify
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */

Expand All @@ -20,6 +20,18 @@ protected static long getCPtr(alerts_dropped_alert obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}

protected static long swigRelease(alerts_dropped_alert obj) {
long ptr = 0;
if (obj != null) {
if (!obj.swigCMemOwn)
throw new RuntimeException("Cannot release ownership as memory is not owned");
ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
obj.delete();
}
return ptr;
}

@SuppressWarnings("deprecation")
protected void finalize() {
delete();
Expand Down
18 changes: 15 additions & 3 deletions src/main/java/org/libtorrent4j/swig/announce_endpoint.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
*
* Do not make changes to this file unless you know what you are doing--modify
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */

Expand All @@ -21,6 +21,18 @@ protected static long getCPtr(announce_endpoint obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}

protected static long swigRelease(announce_endpoint obj) {
long ptr = 0;
if (obj != null) {
if (!obj.swigCMemOwn)
throw new RuntimeException("Cannot release ownership as memory is not owned");
ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
obj.delete();
}
return ptr;
}

@SuppressWarnings("deprecation")
protected void finalize() {
delete();
Expand Down
Loading
Loading