[C#] Update auto-generated bindings to LDK 0.0.123
[ldk-java] / c_sharp / src / org / ldk / structs / Description.cs
index 46b03515e1e029ac3ea0ac0567dc942cc48f8d37..271abfc30b822e65d27554da88f8ba0ff99e5cf9 100644 (file)
@@ -54,7 +54,7 @@ public class Description : CommonBase {
         * Two objects with NULL inner values will be considered "equal" here.
         */
        public bool eq(org.ldk.structs.Description b) {
-               bool ret = bindings.Description_eq(this.ptr, b == null ? 0 : b.ptr);
+               bool ret = bindings.Description_eq(this.ptr, b.ptr);
                GC.KeepAlive(this);
                GC.KeepAlive(b);
                if (this != null) { this.ptrs_to.AddLast(b); };
@@ -72,7 +72,7 @@ public class Description : CommonBase {
         * Please note that single characters may use more than one byte due to UTF8 encoding.
         */
        public static Result_DescriptionCreationErrorZ of(string description) {
-               long ret = bindings.Description_new(description);
+               long ret = bindings.Description_new(InternalUtils.encodeString(description));
                GC.KeepAlive(description);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_DescriptionCreationErrorZ ret_hu_conv = Result_DescriptionCreationErrorZ.constr_from_ptr(ret);
@@ -80,13 +80,27 @@ public class Description : CommonBase {
        }
 
        /**
-        * Returns the underlying description [`String`]
+        * Returns the underlying description [`UntrustedString`]
         */
-       public string into_inner() {
-               string ret = bindings.Description_into_inner(this.ptr);
+       public UntrustedString into_inner() {
+               long ret = bindings.Description_into_inner(this.ptr);
                GC.KeepAlive(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.UntrustedString ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UntrustedString(null, ret); }
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
                if (this != null) { this.ptrs_to.AddLast(this); };
-               return ret;
+               return ret_hu_conv;
+       }
+
+       /**
+        * Get the string representation of a Description object
+        */
+       public string to_str() {
+               long ret = bindings.Description_to_str(this.ptr);
+               GC.KeepAlive(this);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               string ret_conv = InternalUtils.decodeString(ret);
+               return ret_conv;
        }
 
 }