Update C/C++ demo tests with latest 0.0.121 API changes
[ldk-c-bindings] / lightning-c-bindings / demo.c
index c42f6cd589cb04d75a6da6ad5af50010e9edb8f1..31754d86c02503c03a1ce97882df94dce88391fb 100644 (file)
@@ -4,12 +4,13 @@
 #include <stdio.h>
 #include <string.h>
 
-void print_log(const void *this_arg, const LDKRecord *record) {
-       LDKStr mod = Record_get_module_path(record);
-       LDKStr str = Record_get_args(record);
-       printf("%.*s:%d - %.*s\n", (int)mod.len, mod.chars, Record_get_line(record), (int)str.len, str.chars);
+void print_log(const void *this_arg, const LDKRecord record) {
+       LDKStr mod = Record_get_module_path(&record);
+       LDKStr str = Record_get_args(&record);
+       printf("%.*s:%d - %.*s\n", (int)mod.len, mod.chars, Record_get_line(&record), (int)str.len, str.chars);
        Str_free(str);
        Str_free(mod);
+       Record_free(record);
 }
 
 uint32_t get_fee(const void *this_arg, LDKConfirmationTarget target) {