Commit Graph

47 Commits

Author SHA1 Message Date
Carsten Haitzler ca7859168b shh warning
SVN revision: 43257
2009-10-25 08:45:36 +00:00
Gustavo Sverzut Barbieri 8318f4c1f2 allow amalgamation of files, at least symbols don't clash anymore.
more related to amalgamation later.



SVN revision: 42312
2009-09-07 04:23:05 +00:00
Gustavo Sverzut Barbieri a4bd77905d malloc--: error and magic can take statically defined strings so no
need to strdup them.



SVN revision: 42311
2009-09-07 03:32:22 +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 e780763aa0 shutdown array module
SVN revision: 42287
2009-09-06 08:39:04 +00:00
Gustavo Sverzut Barbieri 5ea9ceeafc eina_module must initialize eina_array as it is used.
SVN revision: 42227
2009-09-04 02:34:48 +00:00
Gustavo Sverzut Barbieri 07d2bde900 eina_safety_checks_init()
All these individual init functions are getting messy, some modules
lack them and it's easy to get inconsistent. Safety check needs error
and log, but these need safety checks as well, some modules (lalloc,
rbtree and others) use safety checks but provide no _init().

I want to know if we really gain something to init individual
modules. It should not be that expensive as init should not allocate
heavy resources and the recommendation is to call eina_init() so most
users will do that anyway.

If people agree I'll unmark all *_init() as EAPI and make them private
to eina lib.



SVN revision: 42214
2009-09-04 00:53:19 +00:00
Gustavo Sverzut Barbieri cee03dcb3c eina_log: CONVENTION BREAK!!!! automatically adds \n
Automatically add \n to messages. Since we use that prefix, there is
no use to allow messages without \n, it would look a mess.

Some logging systems may not require the trailing newline, for example
logging to xml or syslog, for those you don't need to ignore this char
if present.

Yes, this breaks convention, but better now than latter. And the
results are not so bad.



SVN revision: 42200
2009-09-03 01:39:45 +00:00
Gustavo Sverzut Barbieri bb717a3be5 less malloc and memory fragmentation.
not that important, but an easy improvement does not hurt.



SVN revision: 42195
2009-09-02 23:11:22 +00:00
Gustavo Sverzut Barbieri 2f8ded1037 loggify eina_module, adding couple of debug info.
SVN revision: 42194
2009-09-02 23:06:55 +00:00
Gustavo Sverzut Barbieri c1e2a300e4 coding style/indent.
SVN revision: 42193
2009-09-02 22:39:41 +00:00
Vincent Torri 72b87160a2 * add eina_config.h in all source files. Fix linking with Visual Studio
* move eina_private.h and eina_safety_checks.h just after eina_config.h


SVN revision: 42077
2009-08-28 12:03:34 +00:00
Vincent Torri 6e7aecc7c0 * Put definition of alloca before any standard header
files according to the doc
 * define _GNU_SOURCE before the inclusion of alloca
   as features.h inclued by alloca.h, defines some
   macros according to _GNU_SOURCE.



SVN revision: 41940
2009-08-23 09:18:14 +00:00
Vincent Torri 989ade86dd fix a bit the documentation
SVN revision: 41870
2009-08-19 07:54:13 +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
Lars Munch 7bcbe02a3e Use correct module extension on cygwin
Patch from: booleanlabel at gmail dot com. Thanks.



SVN revision: 41094
2009-06-18 04:06:34 +00:00
Gustavo Sverzut Barbieri 32ff1f0aa4 better error setting and reporting in module loading.
* just set error codes if we know the error.
 * debug dlopen() error using EINA_ERROR_PDBG()



SVN revision: 41057
2009-06-16 14:59:09 +00:00
Gustavo Sverzut Barbieri df58840124 do not leak module if user do not want it.
SVN revision: 40924
2009-06-06 22:53:03 +00:00
Cedric BAIL a98287fc07 * eina/src/lib/eina_module.c: After deleting all members, we should flush the array.
SVN revision: 39057
2009-02-17 12:58:09 +00:00
Vincent Torri c166854ae1 * minor formatting
* add some doc in eina_array
 * in eina_main.c, include only the necessary headers
 * fix some warnings (size_t <-> int)


SVN revision: 38740
2009-01-23 16:11:45 +00:00
Vincent Torri 7554db7669 too much alloca declarations :-)
SVN revision: 38665
2009-01-20 16:14:36 +00:00
Cedric BAIL 0dda30daf6 * eina/src/include/eina_array.h,
* eina/src/include/eina_f16p16.h,
	* eina/src/include/eina_accessor.h,
	* eina/src/include/eina_list.h,
	* eina/src/include/eina_iterator.h,
	* eina/src/lib/eina_rectangle.c,
	* eina/src/lib/eina_list.c,
	* eina/src/lib/eina_array.c,
	* eina/src/lib/eina_hash.c,
	* eina/src/lib/eina_module.c,
	* eina/src/lib/eina_stringshare.c,
	* eina/src/lib/eina_benchmark.c: Fix for windows compilation.



SVN revision: 38663
2009-01-20 15:56:48 +00:00
Vincent Torri 0d166092ac * fix warning (missing alloca declaration)
* formatting


SVN revision: 38657
2009-01-20 08:29:41 +00:00
Cedric BAIL f722173009 Don't display useless warning.
SVN revision: 38346
2008-12-29 11:49:35 +00:00
Cedric BAIL 73c686a5ea Fix a little mistake.
SVN revision: 38339
2008-12-29 08:53:19 +00:00
Gustavo Sverzut Barbieri ab95d9183d eina safety checks.
safety checks will report null pointers and other error conditions on
public api's and can be disabled by compile time check.

note that in order to have these checks working we need to make
EINA_ARG_NONNULL() void, otherwise GCC can remove these checks since
they're known to be false.

This commit also make two minor changes:

  * list and hash accessors and iterators are created even for empty
    entities. This is correct in my point of view since NULL should
    indicate error. Having these in were an optimziation, but not
    worth it, these are not the most common case and hitting this path
    is not of much cost.

 * unmarked some parameters as nonnull, mainly on list and inlist.



SVN revision: 38327
2008-12-26 18:31:14 +00:00
Cedric BAIL 889d40abf8 Remove PATH_MAX use.
SVN revision: 38288
2008-12-23 13:12:06 +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
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
Cedric BAIL 8b85ce70d4 Patch from quarium.
Add magic to array and list.

Need to patch autotools to generate something like eina_config.h.



SVN revision: 36256
2008-09-25 14:46:16 +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 8bda22fced Add some type checking to Inlined List.
SVN revision: 36084
2008-09-18 14:22:48 +00:00
Cedric BAIL f3bab28c36 Fix module stuff to be able to run test in the build directory.
SVN revision: 36052
2008-09-17 15:21:16 +00:00
Cedric BAIL 345242f6c3 Update copyright credit correctly.
SVN revision: 35774
2008-09-01 12:42:16 +00:00
Vincent Torri 711d48bcd5 now it should be correct
SVN revision: 35724
2008-08-28 23:51:48 +00:00
Vincent Torri 5fddd7766e wrong shared lib extension...
SVN revision: 35723
2008-08-28 23:38:43 +00:00
Vincent Torri dafd079639 * move standard header files from eina_private.h to source files
* minor formatting


SVN revision: 35705
2008-08-28 07:46:42 +00:00
Vincent Torri 29313e097f use 'dll' extension on Windows.
SVN revision: 35704
2008-08-28 06:49:04 +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 f377939d0b Fix some warning.
SVN revision: 35274
2008-07-31 16:54:02 +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