Revert "eina: Eina_Module - check whether the file exists or not, before memory allocation of Eina_Module"

This reverts commit 971589bf56.

this completely breaks existing eina_module usage. elm_test->image remote
This commit is contained in:
Mike Blumenkrantz 2014-07-27 18:51:42 -04:00
parent 164ea41b3e
commit 6817717ee4
2 changed files with 4 additions and 6 deletions

View File

@ -257,9 +257,7 @@ EAPI Eina_Module *eina_module_new(const char *file)
size_t len; size_t len;
EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL); EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL);
/* TODO check that the file exists. Update doc too */
/* check that the file exists. */
if (access(file, F_OK)) return NULL;
len = strlen(file); len = strlen(file);
EINA_SAFETY_ON_FALSE_RETURN_VAL(len > 0, NULL); EINA_SAFETY_ON_FALSE_RETURN_VAL(len > 0, NULL);

View File

@ -112,9 +112,9 @@ extern EAPI Eina_Error EINA_ERROR_MODULE_INIT_FAILED;
* @brief Return a new module. * @brief Return a new module.
* *
* @param file The name of the file module to load. * @param file The name of the file module to load.
* @return A new module. If @p file is @c NULL, or if it does not exist, * @return A new module. If @p file is @c NULL, the function
* the function returns @c NULL, otherwise, it allocates an Eina_Module, * returns @c NULL, otherwise, it allocates an Eina_Module, stores
* stores a duplicate string of @p file, sets its reference to @c 0 and * a duplicate string of @p file, sets its reference to @c 0 and
* its handle to @c NULL. * its handle to @c NULL.
* *
* When the new module is not needed anymore, use eina_module_free() * When the new module is not needed anymore, use eina_module_free()