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
void * PL_blob_data(atom_t a, size_t *len, PL_blob_t **type)

Get the data and type associated to a blob. This function is mainly used from the callback functions described in section 12.4.9.1. Note that if the release() hook is called from PL_cleanup(), blobs are releases regardless of whether or not they are referenced and the order in which blobs are released is undefined (the order depends on the ordering in the atom hash table). PL_blob_data() may be called safely on a blob that has already been released. If this happens during PL_cleanup() the return value is guaranteed to be NULL. During normal execution it may return the content of a newly allocated blob that reused the released handle.