Add TRANSIENTP cases for basic-encoded blobs
authorNot Zed <notzed@gmail.com>
Thu, 10 Jun 2021 08:37:00 +0000 (18:07 +0930)
committerNot Zed <notzed@gmail.com>
Thu, 10 Jun 2021 08:37:00 +0000 (18:07 +0930)
ez-blob-basic.c

index 9378577..88d1375 100644 (file)
@@ -83,6 +83,8 @@ size_t ez_basic_size(const ez_blob_desc *desc, const void *p) {
                        else
                                abort();
                        break;
+               case EZ_BLOB_TRANSIENTP:
+                       break;
                default:
                        abort();
                }
@@ -151,6 +153,9 @@ int ez_basic_decode_raw(const ez_blob_desc *desc, const ez_blob *blob, void *p)
                        } else
                                abort();
                        break;
+               case EZ_BLOB_TRANSIENTP:
+                       *(void **)v = NULL;
+                       break;
                default:
                        abort();
                }
@@ -235,6 +240,8 @@ int ez_basic_encode_raw(const ez_blob_desc *desc, const void *p, ez_blob *blob)
                        } else
                                abort();
                        break;
+               case EZ_BLOB_TRANSIENTP:
+                       break;
                default:
                        abort();
                }