>for binary blobs.
If a blob type is registered from a loadable object (shared object or DLL) the blob type must be deregistered before the object may be released.
- int PL_unregister_blob_type(PL_blob_t *type)
- Unlink the blob type from the registered type and transform the type of
possible living blobs to
unregistered, avoiding further reference to the type structure, functions referred by it, as well as the data. This function returns
TRUEif no blobs of this type existed and
FALSEotherwise. PL_unregister_blob_type() is intended for the uninstall() hook of foreign modules, avoiding further references to the module.
The blob access functions are similar to the atom accessing functions. Blobs being atoms, the atom functions operate on blobs and vice versa. For clarity and possible future compatibility issues, however, it is not advised to rely on this.
- int PL_is_blob(term_t t, PL_blob_t **type)
- Succeeds if t refers to a blob, in which case type is filled with the type of the blob.
- int PL_unify_blob(term_t t, void *blob, size_t len, PL_blob_t *type)
- Unify t to a new blob constructed from the given data and associated to the given type. See also PL_unify_atom_nchars().
- int PL_put_blob(term_t t, void *blob, size_t len, PL_blob_t *type)
- Store the described blob in t. The return value indicates
whether a new blob was allocated (
FALSE) or the blob is a reference to an existing blob (
TRUE). Reporting new/existing can be used to deal with external objects having their own reference counts. If the return