ext/iodine/fio.c
/** Finds the message's metadata by it's type ID. */
Finds the message's metadata by it's type ID.
Finds the message ' s metadata by it ' s type ID .
void *fio_message_metadata(fio_msg_s *msg, intptr_t type_id) {
  fio_msg_metadata_s *meta = ((fio_msg_client_s *)msg)->meta;
  size_t len = ((fio_msg_client_s *)msg)->meta_len;
  while (len) {
    --len;
    if (meta[len].type_id == type_id)
      return meta[len].metadata;
  }
  return NULL;
}
void * fio_message_metadata ( fio_msg_s * msg , intptr_t type_id ) { fio_msg_metadata_s * meta = ( ( fio_msg_client_s * ) msg ) -> meta ; size_t len = ( ( fio_msg_client_s * ) msg ) -> meta_len ; while ( len ) { -- len ; if ( meta [ len ] . type_id == type_id ) return meta [ len ] . metadata ; } return NULL ; }
Finds the message's metadata by it's type ID.
Finds the message ' s metadata by it ' s type ID .