Commit Graph

33 Commits

Author SHA1 Message Date
Jonas M. Gastal cd8cd93209 Eina: Groups shouldn't be inside themselves, and both groups
and conditionals need to be properly closed..



SVN revision: 61413
2011-07-15 18:37:44 +00:00
Carsten Haitzler 11ed8ad05f more dox -> .h
SVN revision: 58437
2011-04-07 12:57:44 +00:00
Mike Blumenkrantz 0c27fd1a29 ecrustify testing: looked good so I'm committing for other people to review as well
SVN revision: 53800
2010-10-23 06:41:45 +00:00
Mike Blumenkrantz e892d9a2bf cleanups for eina_module_list_get type change
vtorri SPANK SPANK SPANK!!!


SVN revision: 51828
2010-09-02 03:28:04 +00:00
Mike Blumenkrantz 44eeac0e1e BOW DOWN BEFORE ME, FOR I HAVE MADE THESE HEADERS READABLE ONCE MORE!
SVN revision: 51065
2010-08-13 06:36:33 +00:00
Mike Blumenkrantz c09c5ed690 and these
SVN revision: 50961
2010-08-10 12:05:51 +00:00
Mike Blumenkrantz 56a0bd9396 implement threadsafety for arrays, alter all eina internal array usage to (hopefully) be threadsafe
call eina_threads_init() to enable this if you have pthread rwlock support (posix 2001)
note some function prototypes have lost const on array params to allow locking
WARNING: you should NOT call eina_threads_shutdown unless you are positive that you will not use any arrays which were created while threadsafe mode were enabled, and vice versa.  Failing to adhere to this warning WILL result in either deadlocks or memory leaks.


SVN revision: 50951
2010-08-10 03:26:15 +00:00
Carsten Haitzler ddc6ba2c2a uncrustify eina.
SVN revision: 50573
2010-07-28 02:37:05 +00:00
Gustavo Sverzut Barbieri 90c5c1daaa doc improvements.
SVN revision: 46670
2010-02-28 21:29:30 +00:00
Gustavo Sverzut Barbieri 66ff799e5e Fix other EINA_PURE/EINA_CONST.
Some of them were working because they were inline, so the compiler
would know an just ignore the flag.

For lists and rbtree there is no problem as after each operation we
must change the pointer to the new head, thus the compiler will
consider it changed.



SVN revision: 46583
2010-02-27 15:17:15 +00:00
Carsten Haitzler 735ad48c39 eina - does modules like the rest of efl, so it's able to be installed with
multiple versions at the same time. eventually will neeed to also include
major number in release name too.



SVN revision: 45594
2010-01-26 15:54:28 +00:00
Mikhail Gusarov 4f7ae8764a eina: fix eina_module_list_get prototype: 'path' argument can be NULL
SVN revision: 45246
2010-01-17 06:01:20 +00:00
Jorge Luis Zapata Muga f3fb3dea17 + [Eina] API change. eina_module_list_flush() -> eina_module_list_free()
as we are on the modules context not the array.
  All the referenced projects are changed too. Remember that the list_free()
  already calls the unload() on each module so no need to call list_unload()



SVN revision: 44978
2010-01-08 12:22:23 +00:00
Gustavo Sverzut Barbieri 4e817e8ecd eina_module: more constness.
Thanks to Fabiano Fidencio for spotting those.



SVN revision: 43921
2009-11-23 13:24:48 +00:00
Gustavo Sverzut Barbieri d2fd0b36e0 eina_module_find: constness and gcc attribute.
Mark both array and module as const as we'll not modify them anyhow
inside this function.

Also mark this function as pure, so gcc will know how to optimize
multiple calls of it. Not that important for this function, but
doesn't hurt either.



SVN revision: 43918
2009-11-23 13:20:34 +00:00
Cedric BAIL ffb0bf8830 * eina_module: Add eina_module_find. Thanks to Fabiano Fidêncio <fidencio@profusion.mobi>.
SVN revision: 43847
2009-11-20 20:46:24 +00:00
Gustavo Sverzut Barbieri e4af7c100c EINA API BREAK: no more individual modules init/shutdown.
Being able to indivually initialize individual modules was initially
"good", but at end it's putting complexities on users that would try
to "optimize" by doing just what they used, but in the end most people
would get them wrong, users would have to do lots of code and etc. At
the end it does not worth.

Most module init just register handful errors and log domains, so are
cheap. The exception is mempool users, that would dlopen() stuff, but
people that are concerned (embedded) can just compile those statically
in eina.

Since at the end any real application would use most of modules, we
actually end saving lots of function calls that would do nothing other
than increment a global counter.

I also did the init/shutdown use an array, making it easier to
maintain. The inital dependencies were analysed by a script I wrote, I
hope it's all right.

Please fix any breakages you find!



SVN revision: 42300
2009-09-06 22:21:56 +00:00
Vincent Torri c45bf860da * remove uneeded semicolons
* fix and add doxygen doc


SVN revision: 41868
2009-08-19 07:09:24 +00:00
Cedric BAIL b02de756a6 * eina: Rename eina_module_list_delete to eina_module_list_flush.
SVN revision: 41385
2009-07-17 11:13:38 +00:00
Vincent Torri 7a3b2110bf * more doc
* check the returned value of eina_error_init() in eina_module_init()


SVN revision: 41218
2009-06-28 06:29:11 +00:00
Vincent Torri ebc20c2236 API BREAK: fix Eina API so that it is more consistent with the other EFL
what is modified:

eina_counter_add -> eina_counter_new
eina_counter_delete -> eina_counter_free
eina_lalloc_delete -> eina_lalloc_free
eina_mempool_new -> eina_mempool_add
eina_mempool_delete -> eina_mempool_del
eina_mempool_alloc -> eina_mempool_malloc
eina_tiler_del -> eina_tiler_free

It remains some questions: have the following API a good name:

eina_module_list_delete
eina_list_free
eina_rbtree_delete

(see ticket #286)

If you find any problem, please report in that thread


SVN revision: 41187
2009-06-24 16:56:49 +00:00
Vincent Torri 9110d8d574 fix a bit the documentation, but there are still
a lot of doc to write...


SVN revision: 41164
2009-06-22 20:03:58 +00:00
Gustavo Sverzut Barbieri b0ee5696a6 eina gets lots of gcc attributes to its api.
this should help with optimizations and code correctness, please see
"info gcc" for detailed explanation on these.

if you experience some functions not working as expected, please
double check if they're not marked with EINA_PURE or EINA_CONST, maybe
I misused them. Remove the macro and try again.

brief explanation:

 * EINA_WARN_UNUSED_RESULT: if you forgot to use the return of some
   function, it will emit a warning (and -Werror will make it an
   error). This way it will be harder to miss the attribution
   "l = eina_list_append(l, v)".

 * EINA_ARG_NONNULL(index, index...): if you give it an explicit NULL
   argument, or some tool (ie: clang) finds it could get a NULL but
   this is not accepted by API, then a warning will be emitted.  This
   will help those that still use eina_hash_add() as if it is
   evas_hash_add().

 * EINA_MALLOC: any non-NULL pointer it returns cannot alias any other
   pointer valid when function returns.

 * EINA_PURE: function have no effects other than the return and this
   return just depend on parameters and/or globals. You might call
   this function in a loop a thousand times and it will return the
   same value, thus you may move this function outside the loop and
   remove it.

 * EINA_CONST: stricter version of EINA_PURE, it will not check for
   global parameters, that is, you cannot consider pointer
   arguments. Use it for math things like "int sqrt(int)".

 * EINA_PRINTF(fmt, arg): will check format parameter specified in
   position "fmt" and passed arguments starting at position "arg", it
   will check for things like giving integers where short or strings
   were expected.

 * EINA_SCANF(fmt, arg): similar to eina_printf().

 * EINA_FORMAT(fmt): for use with things like dgettext(), it will get
   a printf-like format string and modifies it.

Please review and test it with your software, make sure you make clean
before you install the new version so it has any effect.

If you find some functions are missing EINA_WARN_UNUSED_RESULT and
EINA_ARG_NONNULL or others, please add them.



SVN revision: 38323
2008-12-26 13:17:51 +00:00
Cedric BAIL 437c220266 Add dladdr and env code for eina_module from Vincent Torri.
SVN revision: 37374
2008-11-01 15:39:53 +00:00
Sebastian Dransfeld a8c2834987 modules most export init and shutdown as EAPI
SVN revision: 37042
2008-10-24 06:24:08 +00:00
Cedric BAIL 4bb02bdf37 Add more error information during eina module load.
SVN revision: 36955
2008-10-22 08:56:19 +00:00
Cedric BAIL 7c47066009 Change module API to use Eina_Array as we want to use mempool and module for Eina_List.
Fix at the same time a closing bug in eina_module.c.



SVN revision: 36312
2008-09-29 13:28:42 +00:00
Jorge Luis Zapata Muga c9f08f6124 New module API. Port this API to the mempool subsystem and the tests.
Now the modules can define a default function that will be called when the module is loaded and unloaded.

SVN revision: 36207
2008-09-24 12:55:31 +00:00
Cedric BAIL da8c3be66f Add a proposal for a module/plugins API that should match every requirement I
received. It's a little huge right now, but work quite nicely.

It support "static" module, version, recursive lookup and should be able to
replace the module/plugins support in evas and ecore.


SVN revision: 35534
2008-08-18 08:18:16 +00:00
Cedric BAIL ddaa7d4d8f License changes (BSD -> LGPL)
SVN revision: 35360
2008-08-06 18:15:24 +00:00
Cedric BAIL 162f31877f Forgotten declaration.
SVN revision: 35275
2008-07-31 16:55:29 +00:00
Cedric BAIL 86f58ba639 Use only the needed headers per file and remove some warning.
SVN revision: 35253
2008-07-30 13:35:49 +00:00
Cedric BAIL a92e3d6c83 Adding turran work to unify EFL data types and functions.
SVN revision: 35248
2008-07-30 12:46:55 +00:00