Commit Graph

48 Commits

Author SHA1 Message Date
Mike Blumenkrantz 8547ebf47f fix error_find to actually return the Eina_Error instead of just i
SVN revision: 58679
2011-04-15 00:41:01 +00:00
Carsten Haitzler 3b77b6c3c5 move more doc to .h
SVN revision: 58424
2011-04-07 11:55:27 +00:00
Mike Blumenkrantz a9e66d1f32 err...always strcmp this not sure what I was thinking
SVN revision: 57864
2011-03-19 00:15:42 +00:00
Mike Blumenkrantz f0ff4ed477 +EAPI Eina_Error eina_error_find(const char *msg)
SVN revision: 57863
2011-03-19 00:07:23 +00:00
Mike Blumenkrantz bb5a5a5ab4 use stringshare in eina_error
the only restriction here is that eina_error_msg_register cannot be used internally by eina prior to stringshare init, but since this does not happen currently there is no problem :)


SVN revision: 57861
2011-03-18 22:02:03 +00:00
Carsten Haitzler ddc6ba2c2a uncrustify eina.
SVN revision: 50573
2010-07-28 02:37:05 +00:00
Mike Blumenkrantz 37de5b807f +eina_error_msg_modify to change the error string of a registered error; preserves allocation state of message creation (errors created with static_register() will remain statically allocated)
SVN revision: 50484
2010-07-25 06:25:06 +00:00
Gustavo Sverzut Barbieri 7c8ca04def Remove eina_error deprecated functions.
There were deprecated looooooooong ago, use eina_log if there are some
alien users out there.



SVN revision: 46496
2010-02-26 00:28:58 +00:00
Vincent Torri 09d1853ea0 * finish benchmark tutorial
* move internal _init and _shutdown functions in the Global
   part of the code, as it is where they belong
 * fix minor documentation stuff


SVN revision: 44730
2009-12-27 08:45:30 +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 4baa70798c eina_inlist.h is not required anymore.
SVN revision: 42305
2009-09-06 22:56:34 +00:00
Gustavo Sverzut Barbieri 777e74ce7d eina_error: improvements to make it faster.
Use a simple array instead of inlist, error get is now much faster
using direct index access.



SVN revision: 42304
2009-09-06 22:54:49 +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
Gustavo Sverzut Barbieri 8ca1675c51 eina_error: deprecated old logging, move to eina_log.
SVN revision: 42220
2009-09-04 01:37:11 +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
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 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
Cedric BAIL 35526933af * eina: Remove memory leak (patch from Andre Dieb).
SVN revision: 40986
2009-06-09 16:02:20 +00:00
Gustavo Sverzut Barbieri 78f4f011d0 export vargs version of eina_error_print().
SVN revision: 39879
2009-04-06 12:41:50 +00:00
Cedric BAIL e31b5e961e * eina/src/lib/eina_list.c: Use less code.
* eina/src/lib/eina_error.c: Add a way to abord on any error message.



SVN revision: 39196
2009-02-25 10:46:14 +00:00
Jorge Luis Zapata Muga 40d9cab09a + Fix some english typos
+ Fix some macros that need an expression and there are no attributes support, just pass the expression as is

SVN revision: 38792
2009-01-26 16:23:07 +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
tilman 4c70375594 Fixed two trivial const correctness issues.
SVN revision: 38621
2009-01-17 17:13:03 +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 6a87ca7590 Make code understandable by Visual Studio.
SVN revision: 38287
2008-12-23 10:04:46 +00:00
Vincent Torri 84dcc24d09 Fix compilation and warnings on Windows:
* include Evil.h for getenv on mingw32ce
 * include config.h in benchmark.c so that EAPI is correctly defined
 * minor fixes in configure.ac


SVN revision: 36729
2008-10-16 21:31:51 +00:00
Cedric BAIL b1768c99e6 Make eina_error depend on no other sub module that need initialization.
SVN revision: 36361
2008-09-30 16:25:11 +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
Vincent Torri f50feadeae * add benchmark and file documentation
* reorganize a bit more. it's not finished
 * fix spellingg and formatting 
 * gnuplot file names generated by our bechmarks tests have an
   absolute time description and not H:M:S description, as this
   breaks the check out of the repo on Windows.


SVN revision: 36090
2008-09-19 05:22:43 +00:00
Vincent Torri 54de28cc68 * add doc for counter and convert modules
* minor spelling, formatting and doxygen fixes


SVN revision: 36057
2008-09-17 18:55:54 +00:00
Vincent Torri b73180cd01 * add array doc
* eina_array_push() returns now a bool
 * fix compilation


SVN revision: 35871
2008-09-07 19:12:49 +00:00
Vincent Torri 1f3a6a7c5a fix examples in tutorial
SVN revision: 35851
2008-09-06 09:14:54 +00:00
Vincent Torri 108e5a3ee5 * fix section title
* forget a remark


SVN revision: 35850
2008-09-06 08:54:22 +00:00
Vincent Torri 7e6e46723e * finish tutorial of eina_error
* spelling


SVN revision: 35849
2008-09-06 08:48:36 +00:00
Vincent Torri ae2e95969f * add documentation and a tutorial for the error module
* change api (eina_error_register to eina_error_msg_register)


SVN revision: 35838
2008-09-05 07:58:38 +00:00
Vincent Torri ccf94fe4e3 * EAPI is now correctly defined on Windows
* move an exported variable


SVN revision: 35712
2008-08-28 12:41:58 +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
Jorge Luis Zapata Muga 7ae301f601 Place pre-conditions where they belong
Remove unused rectangle functions

SVN revision: 35634
2008-08-23 19:50:21 +00:00
Cedric BAIL c035c8eeab Use the right type.
SVN revision: 35459
2008-08-13 09:26:13 +00:00
doursse bbf9b05530 fix doxy doc
SVN revision: 35416
2008-08-09 05:47:15 +00:00
Cedric BAIL 5cfb71ff72 Remove warning fix test covering.
SVN revision: 35405
2008-08-08 12:29:13 +00:00
Jorge Luis Zapata Muga ee54713d9d Allow user provided functions for printing messages
Make the stdout print mgs function exportable
Add a FILE * print msg function (useful for logging)


SVN revision: 35404
2008-08-08 10:39:47 +00:00
Cedric BAIL f193096aa8 Add eina_list test suite. Cleanup list implementation and share out of memory error.
SVN revision: 35378
2008-08-07 13:09:09 +00:00
Cedric BAIL ddaa7d4d8f License changes (BSD -> LGPL)
SVN revision: 35360
2008-08-06 18:15:24 +00:00
Cedric BAIL 5f85aa8a80 Hide the type.
SVN revision: 35321
2008-08-04 17:00:30 +00:00
Cedric BAIL 645db96755 Fix error get/set.
SVN revision: 35300
2008-08-01 14:26:13 +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