summaryrefslogtreecommitdiff
path: root/ufo/ufo-resources.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2017-10-16 12:44:16 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2017-10-16 12:44:16 +0200
commit83b3f9b8f4ad78044c1163bb08c27c7d59c53686 (patch)
treee775f29e4a294d84e7b3b1217757905f977187ae /ufo/ufo-resources.c
parentc6abf4700698546eac71c54abf593ba4cd419d29 (diff)
Revert "Expose file reading in resources"
Functionality already exists in ufo_resource_get_kernel_source().
Diffstat (limited to 'ufo/ufo-resources.c')
-rw-r--r--ufo/ufo-resources.c29
1 files changed, 3 insertions, 26 deletions
diff --git a/ufo/ufo-resources.c b/ufo/ufo-resources.c
index 13e9322..0b2ac69 100644
--- a/ufo/ufo-resources.c
+++ b/ufo/ufo-resources.c
@@ -232,7 +232,7 @@ release_program (cl_program program)
}
static gchar *
-lookup_file_path (UfoResourcesPrivate *priv,
+lookup_kernel_path (UfoResourcesPrivate *priv,
const gchar *filename)
{
GList *it;
@@ -259,29 +259,6 @@ lookup_file_path (UfoResourcesPrivate *priv,
return NULL;
}
-/**
- * ufo_resources_lookup_and_read_file:
- * @resources: A #UfoResources object
- * @filename: filename to read (absolute path or relative path visible to UFO)
- *
- * Find filename and read its contents.
- *
- * Returns: String with contents of filename
- */
-gchar *
-ufo_resources_lookup_and_read_file (UfoResources *resources,
- const gchar *filename)
-{
- UfoResourcesPrivate *priv = resources->priv;
- gchar *path = lookup_file_path (priv, filename);
-
- if (!path) {
- return NULL;
- }
-
- return read_file (path);
-}
-
static gboolean
platform_has_gpus (cl_platform_id platform)
{
@@ -749,7 +726,7 @@ ufo_resources_get_kernel_with_opts (UfoResources *resources,
kernel = NULL;
buffer = NULL;
priv = resources->priv;
- path = lookup_file_path (priv, filename);
+ path = lookup_kernel_path (priv, filename);
if (path == NULL) {
g_set_error (error, UFO_RESOURCES_ERROR, UFO_RESOURCES_ERROR_LOAD_PROGRAM,
@@ -913,7 +890,7 @@ ufo_resources_get_kernel_source (UfoResources *resources,
buffer = NULL;
priv = resources->priv;
- path = lookup_file_path (priv, filename);
+ path = lookup_kernel_path (priv, filename);
if (path == NULL) {
g_set_error (error, UFO_RESOURCES_ERROR, UFO_RESOURCES_ERROR_LOAD_PROGRAM,