struct ucl_emitter_context *ctx,
const ucl_object_t *obj);
+/**
+ * Fetch URL into a buffer
+ * @param url url to fetch
+ * @param buf pointer to buffer (must be freed by callee)
+ * @param buflen pointer to buffer length
+ * @param err pointer to error argument
+ * @param must_exist fail if cannot find a url
+ */
+bool ucl_fetch_url (const unsigned char *url,
+ unsigned char **buf,
+ size_t *buflen,
+ UT_string **err,
+ bool must_exist);
+
+/**
+ * Fetch a file and save results to the memory buffer
+ * @param filename filename to fetch
+ * @param len length of filename
+ * @param buf target buffer
+ * @param buflen target length
+ * @return
+ */
+bool ucl_fetch_file (const unsigned char *filename,
+ unsigned char **buf,
+ size_t *buflen,
+ UT_string **err,
+ bool must_exist);
+
/**
* Add new element to an object using the current merge strategy and priority
* @param parser
rspamadm_op_hash (gconstpointer p)
{
const struct fuzzy_merge_op *op = p;
+ guint res;
/* Uniformly distributed */
- return *(guint *)op->digest;
+ memcpy (&res, op->digest, sizeof (res));
+ return res;
}
static gboolean