2013-06-04 Cedric Bail
* Evas: correctly detect if loader support asynchronous preloading.
+ * Eina: add eina_file_dup.
2013-06-03 Ederson Desouza
- Add eina_log_timing()
- Add eina_inlist_first
- Add eina_inlist_last
- - Added eina_str_convert_len() to work around broken eina_str_convert()
+ - Add eina_str_convert_len() to work around broken eina_str_convert()
+ - Add eina_file_dup()
* eet:
- Add eet_mmap()
- Add eet_data_descriptor_name_get()
EAPI Eina_File *eina_file_open(const char *name, Eina_Bool shared) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
/**
+ * @brief Dup a read-only handler of a previously open file.
+ *
+ * @param file To duplicate a reference to
+ * @return Eina_File handle to the duplicated file
+ *
+ * Opens a file in read-only mode.
+ *
+ * @since 1.8
+ */
+EAPI Eina_File * eina_file_dup(Eina_File *file);
+
+/**
* @brief Unref file handler.
*
* @param file File handler to unref.
return _eina_file_escape(eina_file_cleanup(result), len);
}
+EAPI Eina_File *
+eina_file_dup(Eina_File *file)
+{
+ if (file) file->refcount++;
+ return file;
+}
+
EAPI void
eina_file_close(Eina_File *file)
{