I was trying to use this with pygobject for an OCI+ostree project, and pygobject
rejected simply assigning to the field (understandably, since it can't bind the
lifetime together).
Add a wrapper function, which is still unsafe, but hides that unsafety
where most people shouldn't find it. And if they do...well, sorry,
Rust wasn't invented when ostree was started.
Closes: #1295
Approved by: pwithnall
ostree_repo_write_commit_with_time
ostree_repo_read_commit_detached_metadata
ostree_repo_write_commit_detached_metadata
+OstreeRepoCheckoutAtOptions
+ostree_repo_checkout_at_options_set_devino
OstreeRepoCheckoutMode
OstreeRepoCheckoutOverwriteMode
ostree_repo_checkout_tree
LIBOSTREE_2017.13 {
global:
ostree_checksum_file_at;
+ ostree_repo_checkout_at_options_set_devino;
} LIBOSTREE_2017.12;
/* Stub section for the stable release *after* this development one; don't
return TRUE;
}
+/**
+ * ostree_repo_checkout_at_options_set_devino:
+ * @opts: Checkout options
+ * @cache: (transfer none) (nullable): Devino cache
+ *
+ * This function simply assigns @cache to the `devino_to_csum_cache` member of
+ * @opts; it's only useful for introspection.
+ *
+ * Note that cache does *not* have its refcount incremented - the lifetime of
+ * @cache must be equal to or greater than that of @opts.
+ */
+void
+ostree_repo_checkout_at_options_set_devino (OstreeRepoCheckoutAtOptions *opts,
+ OstreeRepoDevInoCache *cache)
+{
+ opts->devino_to_csum_cache = cache;
+}
+
static guint
devino_hash (gconstpointer a)
{
*
* This function will add a reference to @cache without copying - you
* should avoid further mutation of the cache.
+ *
+ * Since: 2017.13
*/
void
ostree_repo_commit_modifier_set_devino_cache (OstreeRepoCommitModifier *modifier,
_OSTREE_PUBLIC
void ostree_repo_devino_cache_unref (OstreeRepoDevInoCache *cache);
+_OSTREE_PUBLIC
+void ostree_repo_checkout_at_options_set_devino (OstreeRepoCheckoutAtOptions *opts, OstreeRepoDevInoCache *cache);
+
_OSTREE_PUBLIC
gboolean ostree_repo_checkout_at (OstreeRepo *self,
OstreeRepoCheckoutAtOptions *options,