DtsodV24_serialize updated to safethrow

This commit is contained in:
2022-04-17 18:01:41 +03:00
parent 8d3991f8fb
commit 0464bd54df
7 changed files with 73 additions and 62 deletions

View File

@@ -42,7 +42,10 @@ void test_dtsod(){
print_dtsod(dtsod);
char* s;
optime("serialize",1,(s=DtsodV24_serialize(dtsod)));
optime("serialize",1,({
tryLast(DtsodV24_serialize(dtsod),r)
s=r.value.VoidPtr;
}));
Hashtable_free(dtsod);
printf("\e[92m%s",s);
@@ -50,7 +53,8 @@ void test_dtsod(){
tryLast(DtsodV24_deserialize(s),r)
dtsod=r.value.VoidPtr;
free(s);
s=DtsodV24_serialize(dtsod);
tryLast(DtsodV24_serialize(dtsod),rr)
s=rr.value.VoidPtr;
Hashtable_free(dtsod);
}));