12.4.9.2 Accessing blobs
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Foreign Language Interface
        • The Foreign Include File
          • BLOBS: Using atoms to store arbitrary binary data
            • Accessing blobs
              • PL_is_blob()
              • PL_unify_blob()
              • PL_put_blob()
              • PL_get_blob()
              • PL_blob_data()
    • Packages
Availability:C-language interface function
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 is TRUE this reference count must be incremented, and it must be decremented on blob destruction callback. See also PL_put_atom_nchars().