Commit Graph

1127 Commits

Author SHA1 Message Date
Vincent Torri eccd70139b formatting, whitespaces--
SVN revision: 54221
2010-11-06 07:37:52 +00:00
Cedric BAIL 57997619c9 * eina: fix eina_tiler_iterator_new API to be consistent with the
rest of the iterator API and usage.

	WARNING !!! THIS IS REALLY BAD BUT FOR CONSISTENCY, I THINK THAT THIS
	API BREAK WAS NEEDED. IN FACT IT'S MORE AN ABI BREAK AS IT WILL NOT
	TRIGGER WARNING OR ERROR IN CURRENT PROGRAM USING
	eina_tiler_iterator_new SO YOU ARE WARNED !

	Reported by playya <frederik.sdun@googlemail.com>.


SVN revision: 54153
2010-11-04 14:53:00 +00:00
Cedric BAIL 64aa07c793 * eina: fix typos.
SVN revision: 54127
2010-11-03 17:32:07 +00:00
Cedric BAIL c40d642b02 * eina: fix possible race condition between opendir/readdir_r/pathconf.
See http://womble.decadent.org.uk/readdir_r-advisory.html .


SVN revision: 54117
2010-11-03 10:19:55 +00:00
Cedric BAIL 19bce347b0 * eina: use fstatat when available.
Maybe we could add an eina_file_lstat_ls.


SVN revision: 54108
2010-11-02 17:47:19 +00:00
Cedric BAIL 17973f336e * eina: add eina_file_stat_ls and guaranty that eina_file_direct_ls
will not call anything else than readdir_r.


SVN revision: 54105
2010-11-02 17:07:04 +00:00
Cedric BAIL eb4cd21f0c * eina: remove dirent so apps don't rely on non portable code.
SVN revision: 54103
2010-11-02 15:11:05 +00:00
Carsten Haitzler a08524ea65 aaagh. dirent... bad! too many things in dirent that are not portable
- d_type for example... so put that into the direct_info struct and
handle the compat in eina.



SVN revision: 54015
2010-10-30 05:48:07 +00:00
Tiago Rezende Campos Falcao fd1c8603ee Removing dead assignment.
Reported in:
http://people.profusion.mobi/~lfelipe/static_analysis/efl/efl-53990/eina/2010-10-29-1/report-w3Z1oM.html#EndPath

SVN revision: 53999
2010-10-29 17:19:19 +00:00
Tiago Rezende Campos Falcao 1e78927ed1 Remove possivle null pointer.
Reported in:
http://people.profusion.mobi/~lfelipe/static_analysis/efl/efl-53990/eina/2010-10-29-1/report-mqFB7z.html#EndPath

SVN revision: 53998
2010-10-29 17:19:15 +00:00
Cedric BAIL 2794a9afc9 * eina: fix usage of eina_file_*ls in thread.
SVN revision: 53948
2010-10-28 09:59:27 +00:00
Carsten Haitzler 788a3357e9 dont free null ptrs eh?
SVN revision: 53944
2010-10-28 03:46:52 +00:00
Cedric BAIL 4d36ee36e2 * eina: make eina_file_ls and eina_file_direct_ls container be DIR*.
SVN revision: 53862
2010-10-25 12:25:24 +00:00
Cedric BAIL 59671af073 * eina: improve eina_rbtree doc to please discomfitor.
SVN revision: 53835
2010-10-24 15:29:23 +00:00
Gustavo Sverzut Barbieri a528a88fe0 fix amalgamation build
SVN revision: 53821
2010-10-23 20:57:08 +00:00
Cedric BAIL e199293a56 * eina: remove unecessary free.
SVN revision: 53817
2010-10-23 17:56:48 +00:00
Vincent Torri f9da29e6a6 put EFL_DEBUG_THREADS inside EFL_HAVE_POSIX_THREADS
SVN revision: 53816
2010-10-23 17:17:03 +00:00
Cedric BAIL 4b1e2abc23 * eina: improve threads and debugging support in one big mempool.
SVN revision: 53815
2010-10-23 16:56:36 +00:00
Carsten Haitzler 8055b915b7 windows mutex shutdown correctness++
SVN revision: 53801
2010-10-23 07:52:51 +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
Carsten Haitzler 8074415ffc slight mistake - trash cleanup on shutdown didnt null out base
SVN revision: 53797
2010-10-23 04:40:30 +00:00
Carsten Haitzler 51e3cd6419 lets lock del too eh?
SVN revision: 53796
2010-10-23 04:36:52 +00:00
Carsten Haitzler 222c59ba12 cedric.. has been a bad boy. cleaning up some of his mess. still have
a leak somewhere. very very slow now.



SVN revision: 53793
2010-10-23 03:45:06 +00:00
Mike Blumenkrantz 7d03bcd110 3 hours and a lot of bugfixing later, uncrustify can now align the * for function prototypes
SVN revision: 53781
2010-10-22 19:58:49 +00:00
Mike Blumenkrantz cb4e0c8a75 this is the second test of my new uncrustify+config
*all struct members are aligned and spaced
*all post-function macros are force-spaced
*all post-function macros are parsed
*all macro definitions are backslash aligned


SVN revision: 53775
2010-10-22 17:30:54 +00:00
Carsten Haitzler 6199da8d8a fix doc s!
SVN revision: 53665
2010-10-20 13:54:01 +00:00
Rafael Fonseca 5b4996881e Add valgrind support to one_big mempool.
SVN revision: 53428
2010-10-14 19:28:32 +00:00
Rafael Fonseca 9733a55c22 Mark memory as accessable before popping it from stack.
When we push a memory to the trash stack we mark it as unaccessable. So we
should mark it as accessible before returning it to the user.



SVN revision: 53427
2010-10-14 19:24:00 +00:00
Rafael Fonseca 4bd0432caf Just mark memory as freed after actually freeing it.
Otherwise valgrind would complain about invalid memory access.



SVN revision: 53426
2010-10-14 19:19:13 +00:00
Rafael Fonseca 6485492cbe Make valgrind know about eina mempools.
Because mempools generally allocate a big memory area and distribute chunks of
that area to the users, valgrind can not know about logical invalid access. By
using some valgrind macros we can tell valgrind about mempools and which area
can be accessed or not.

To start with I have just done valgrind integration on chained mempool but soon
it will be done for one_big too.

The code below is an example on which valgrind wouldn't complain without this
patch:

@code
#include <Eina.h>

int
main(int argc, char *argv[])
{
    int i, *pool[4];
    Eina_Mempool *mp;

    eina_init();
    mp = eina_mempool_add("chained_mempool", "test", NULL, sizeof(int), 4);

    for (i = 0; i < 4; i++) {
        pool[i] = eina_mempool_malloc(mp, sizeof(int));
        *pool[i] = i;
    }

    printf("Valid mp pointer: pool[0] = %d\n", *pool[0]);
    eina_mempool_free(mp, pool[0]);
    printf("Freed mp pointer: pool[0] = %d\n", *pool[0]);

    for (i = 1; i < 4; i++)
        eina_mempool_free(mp, pool[i]);

    eina_mempool_del(mp);
    eina_shutdown();

    return 0;
}
@endcode



SVN revision: 53405
2010-10-14 15:18:15 +00:00
Cedric BAIL 39a6e2df5a * eina: use pthread_equal.
SVN revision: 53400
2010-10-14 14:17:48 +00:00
Cedric BAIL c7245e24ed * eina: fix amalgamation build.
SVN revision: 53392
2010-10-14 11:07:10 +00:00
Cedric BAIL 7f9845c66f * eina: make Vincent happy.
SVN revision: 53362
2010-10-13 16:30:22 +00:00
Cedric BAIL f9b8578ea6 * eina: add assert to ease tracking down efl misuse with threads.
SVN revision: 53360
2010-10-13 15:35:56 +00:00
Cedric BAIL a44992380f * eina: easy speed improvement by reducing operation of mempool.
SVN revision: 53349
2010-10-13 12:12:45 +00:00
Cedric BAIL 0e7accd2ba * eina: don't bench ecore anymore as it's to slow.
SVN revision: 53346
2010-10-13 09:34:40 +00:00
Cedric BAIL 0d02671e99 * eina: improve chained mempool speed.
By removing pthread lock when thread safety is not required.
	By not walking over the buffer for nothing.


SVN revision: 53310
2010-10-12 16:53:30 +00:00
Gustavo Sverzut Barbieri b11b2f95b5 auto-init threads and fix spinlock initialization checks.
* it is valid to use eina_log_threads_enable() without
   eina_threads_init(), so call eina_log_threads_init() in that case.

 * pthread_spin_init() returns 0 on success! check that and report any errors.



SVN revision: 53169
2010-10-07 22:14:03 +00:00
Eduardo de Barros Lima a5a3fc18e5 Eina: Don't #define _GNU_SOURCE
Instead use AC_GNU_SOURCE macro in configure.ac



SVN revision: 53157
2010-10-07 19:29:32 +00:00
Carsten Haitzler f1cac3e69c add pid to eina log.
SVN revision: 53091
2010-10-06 07:09:05 +00:00
Cedric BAIL 2bd686db2b * eina: fix typo.
SVN revision: 53055
2010-10-05 11:32:12 +00:00
Chidambar Zinnoury be17392520 eina: strrchr--.
SVN revision: 53000
2010-10-03 15:08:18 +00:00
Marc Andre Tanner 3966e2e027 eina: fix compilation if safety checks are disabled
A few files include eina_safety_checks.h and then expect that
eina_log.h is also dragged in, however this isn't the case if
the safety checks were disabled at configure stage.

Include eina_log.h explicitly to fix this.

Patch by: Marc Andre Tanner <mat@brain-dump.org>



SVN revision: 52949
2010-10-01 12:18:39 +00:00
Marc Andre Tanner 431685d37a eina: fix wrong EINA_ARG_NONNULL
This fixes the following error:

CC     libeina_la-eina_error.lo
CC     libeina_la-eina_log.lo
In file included from ../../src/include/eina_safety_checks.h:69,
from eina_error.c:150:
../../src/include/eina_error.h:53: error: nonnull argument references non-pointer operand (argument 1, operand 1)
make[3]: *** [libeina_la-eina_error.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from ../../src/include/eina_safety_checks.h:69,
from eina_log.c:287:
../../src/include/eina_error.h:53: error: nonnull argument references non-pointer operand (argument 1, operand 1)
make[3]: *** [libeina_la-eina_log.lo] Error 1
make[3]: Leaving directory `/data/projects/qi-bootmenu-system/build/temp-armv4tl/eina/src/lib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/data/projects/qi-bootmenu-system/build/temp-armv4tl/eina/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/data/projects/qi-bootmenu-system/build/temp-armv4tl/eina'
make: *** [all] Error 2

Patch by: Marc Andre Tanner <mat@brain-dump.org>



SVN revision: 52947
2010-10-01 12:18:04 +00:00
Vincent Torri 72c7182a15 fix
SVN revision: 52882
2010-09-29 08:12:08 +00:00
Vincent Torri e06c65f79d NAME_MAX defined to 255 on sun (if not defined).
SVN revision: 52881
2010-09-29 06:37:56 +00:00
Vincent Torri c4771c0127 include limits.h. Should acctually work with DSB, macosx and openindiana.
SVN revision: 52880
2010-09-29 05:41:09 +00:00
Lucas De Marchi 6666a9e795 Exclude win from prio drop implementation
Win will use another completely different approach. So, change the
guards to EFL_HAVE_POSIX_THREADS.

Also, include eina_sched.h as should have been done.



SVN revision: 52654
2010-09-23 20:58:19 +00:00
Lucas De Marchi a95105a888 Implement function to drop priority of current thread
This function is useful for libraries like ecore and evas that have to
set some worker threads. The first thing these threads should do is to
call this function, so the main thread might continue running without
the worker threads interrupting it too much.



SVN revision: 52651
2010-09-23 20:38:48 +00:00
Cedric BAIL 80bbb4584c * eina: call malloc only when content is requested from the pool.
SVN revision: 52543
2010-09-21 15:18:15 +00:00
Mike Blumenkrantz f7bf462ef4 revert whoops
SVN revision: 52537
2010-09-21 06:52:10 +00:00
Mike Blumenkrantz 005cf69302 ecore_con_url_free migration
SVN revision: 52536
2010-09-21 06:51:07 +00:00
Eduardo de Barros Lima acae2fc370 Eina_List: Revert changes introduced in r52253
The patch was trying to fix an error caused by wrong usage of this function



SVN revision: 52496
2010-09-20 18:20:40 +00:00
Lucas De Marchi 71cba7da35 Fix typos
"he->the" where appropriate



SVN revision: 52493
2010-09-20 17:09:13 +00:00
Eduardo de Barros Lima 2216c53641 Eina_List: Avoid Segfault
Some inputs in which tmp - cur is greater than the number of previous nodes
in list, were causing ct to be null at end of loop.

Patch by Jonas M. Gastal <jgastal@profusion.mobi>



SVN revision: 52253
2010-09-14 18:29:30 +00:00
Vincent Torri f7b1362905 add braces to remove ambiguous condition warning
SVN revision: 52246
2010-09-14 15:57:20 +00:00
Mike Blumenkrantz 534bd43e9d initial doxy patch for rbtree from vtorri
CEDRIC WRITE DOCS FOR THIS!


SVN revision: 52172
2010-09-12 19:28:18 +00:00
Mike Blumenkrantz 1970f8dd6c more doxy from vtorri
SVN revision: 52164
2010-09-12 08:03:21 +00:00
Mike Blumenkrantz eb775222a5 variable name changes for accessor functions
patch by vtorry
compile testing frowned upon by andredieb


SVN revision: 52163
2010-09-12 06:49:57 +00:00
Lucas De Marchi c4a0cef6e6 Fix typos in docs
* eina_thread_init doesn't exist. eina_threads_init it is;
* 'mutexes' is a more common spelling, not 'mutexs'



SVN revision: 52136
2010-09-10 12:01:52 +00:00
Lucas De Marchi 935cd5b9e5 Fix common misspellings
Following misspellings were fixed:

occured->occurred
immediatly->immediately



SVN revision: 52018
2010-09-09 02:19:54 +00:00
Iván Briano 8374dea693 Evil patch from Evil vtorri. Some improvements to Eina docs.
Yup, docs.. truly evil.


SVN revision: 51993
2010-09-08 17:41:05 +00:00
Cedric BAIL 6c69d6f60e * eina: fix doc, patch by Vincent Torri.
SVN revision: 51983
2010-09-08 08:38:48 +00:00
Lucas De Marchi 33dcb37afe Fix common misspellings
The following misspellings were fixed:

asociated->associated
convertion->conversion
exemple->example
existant->existent
immediatly->immediately
isnt->isn't
loosing->losing
memeber->member
occured->occurred
occurence->occurrence
occurences->occurrences
ocurred->occurred
recomended->recommended
sucess->success
teh->the
tiem->time
usefull->useful




SVN revision: 51962
2010-09-08 03:21:16 +00:00
Lucas De Marchi 15ae42344e Fix typo in doxygen
SVN revision: 51932
2010-09-06 22:48:58 +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
Vincent Torri 490413be14 use Eina_Bool instead of unsigned int
SVN revision: 51825
2010-09-01 22:31:43 +00:00
Vincent Torri c85dffafd8 typo
SVN revision: 51799
2010-09-01 06:48:52 +00:00
Vincent Torri a4a7bc6b43 format a bit the doc and add corner cases
SVN revision: 51798
2010-09-01 06:45:33 +00:00
Mike Blumenkrantz 05f38ae44a yarrrrrrr I've got yer rum right here, you landlubber! HAR HAR HAR!
SVN revision: 51790
2010-08-31 22:39:02 +00:00
Mike Blumenkrantz bc7bb345a6 move function into local, reformat
SVN revision: 51787
2010-08-31 21:19:54 +00:00
Mike Blumenkrantz 7a5677ad43 finish removing threadsafe stuff
SVN revision: 51687
2010-08-27 21:41:03 +00:00
Mike Blumenkrantz 671f193066 fix -I for eina_private.h
THIS IS BROKEN IN ALPHA RELEASE. WHOEVER BROKE IT: SPANK SPANK SPANK!


SVN revision: 51683
2010-08-27 18:18:41 +00:00
Lucas De Marchi d8002ff386 Revert and re-apply badnull patch
Revert previous patch generated by badnull.cocci script, and apply the new one.
The main difference is that assert and assert-like functions are not touched
anymore.




SVN revision: 51650
2010-08-26 01:34:13 +00:00
Carsten Haitzler c69a28315c force to unisgned char
SVN revision: 51624
2010-08-25 02:04:37 +00:00
Carsten Haitzler 1412fb1c94 and cppcheck yes -> init to NULL so check and free works.
SVN revision: 51550
2010-08-22 22:39:26 +00:00
Carsten Haitzler 8093b21ddb cppcheck -> shhh. yes. we know. leak.
SVN revision: 51549
2010-08-22 22:38:06 +00:00
Carsten Haitzler ed78d8a36b mempool -> init the mempool with calloc. we cannot know for sure the
mempool backend inits all members, so make sure they are set to 0. not
a cost worth quibbling over. how many mempools do you really create
during the life of an app?



SVN revision: 51548
2010-08-22 22:35:24 +00:00
Carsten Haitzler 9b006054b7 again -> shut cppcheck up.
SVN revision: 51547
2010-08-22 22:32:30 +00:00
Carsten Haitzler b1dee3fc6d leak-- in win32 code.
SVN revision: 51546
2010-08-22 22:30:55 +00:00
Carsten Haitzler 64d565228a cppcheck doesn't like it if u dont first init all data before using
contents of that struct (minus the thing u are about to set)



SVN revision: 51545
2010-08-22 22:29:25 +00:00
Vincent Torri 402c60b18b get the verbosity with the env variable CK_VERBOSITY. By default, nothing is changed.
SVN revision: 51535
2010-08-22 17:58:01 +00:00
Carsten Haitzler e9acd2dfc8 on advice of vtorri <- revert until proven that limits.h works on
these other os's.



SVN revision: 51512
2010-08-22 06:00:13 +00:00
Carsten Haitzler eb1a43bfbf oops - formatting at start too - not just end
SVN revision: 51510
2010-08-22 05:47:44 +00:00
Carsten Haitzler 1974702021 fmting
SVN revision: 51507
2010-08-22 02:32:47 +00:00
Joerg Sonnenberger 4497367d7f From: Joerg Sonnenberger <joerg@britannica.bec.de>
pthread_t is opaque, so make less assumptions...



SVN revision: 51506
2010-08-22 01:15:47 +00:00
Joerg Sonnenberger 527f011af9 From: Joerg Sonnenberger <joerg@britannica.bec.de>
Use portable header to work on all POSIX compliant systems.
Doesn't break non-POSIX systems as limits.h is a C90 header.



SVN revision: 51505
2010-08-22 01:15:18 +00:00
Vincent Torri 0686aa04af add vasprintf declaration on Windows
SVN revision: 51497
2010-08-21 17:25:46 +00:00
Lucas De Marchi 5a8a8c9014 Convert (hopefully) all comparisons to NULL
Apply badzero.cocci, badnull.coci and badnull2.cocci

This should convert all cases where there's a comparison to NULL to simpler
forms. This patch applies the following transformations:

code before patch               ||code after patch
===============================================================

return a == NULL;                 return !a;

return a != NULL;                 return !!a;

func(a == NULL);                  func(!a);

func(a != NULL);                  func(!!a);

b = a == NULL;                    b = !a;

b = a != NULL;                    b = !!a;

b = a == NULL ? c : d;            b = !a ? c : d;

b = a != NULL ? c : d;            b = a ? c : d;


other cases:

a == NULL                         !a
a != NULL                         a




SVN revision: 51487
2010-08-21 13:52:25 +00:00
Cedric BAIL e6f9cee051 * eina: fix structure content to be more futur proof and reduce
risk of ABI breakage.


SVN revision: 51390
2010-08-19 12:02:28 +00:00
Tom Hacohen 6a0b488468 Eina: Moved the private headers to src/lib where they belong.
SVN revision: 51388
2010-08-19 08:30:01 +00:00
Cedric BAIL ccebf54881 * eina: fix some warning by Albin Tonnerre.
SVN revision: 51246
2010-08-17 11:48:50 +00:00
Vincent Torri ca4497509e i forgot about amalgamation. fix declaration too
SVN revision: 51243
2010-08-17 07:39:53 +00:00
Vincent Torri 333b64f15e some doc fixes
SVN revision: 51242
2010-08-17 06:58:26 +00:00
Vincent Torri d4cd8f28ae formatting
SVN revision: 51241
2010-08-17 06:05:21 +00:00
Vincent Torri 32932b4135 alloca() declaration
SVN revision: 51240
2010-08-17 05:44:11 +00:00
Vincent Torri 4e09c14e08 formatting
SVN revision: 51239
2010-08-17 05:28:34 +00:00
Vincent Torri 2e13d0c790 formatting
SVN revision: 51238
2010-08-17 05:22:10 +00:00
Vincent Torri 13a1bdf6e0 formatting
SVN revision: 51237
2010-08-17 05:21:13 +00:00
Vincent Torri db666d9feb remove rwlock code
SVN revision: 51236
2010-08-17 05:15:28 +00:00
Lucas De Marchi 80b44315f7 eina-0 is no more, check for the right package name
SVN revision: 51235
2010-08-17 03:59:29 +00:00
Cedric BAIL e3a887235d * eina: remove configure option for rwlock as it is not used anymore.
SVN revision: 51220
2010-08-16 15:36:17 +00:00
Cedric BAIL c45c36bd80 * eina: attempt to improve a little bit more the header.
Mainly trailing space and macro indentation.


SVN revision: 51217
2010-08-16 15:02:37 +00:00
Cedric BAIL 6293bd87fa * eina: fix amalgamation.
SVN revision: 51210
2010-08-16 13:52:34 +00:00
Cedric BAIL f75eab161d * eina: remove thread safe data type for now. They will be back !
SVN revision: 51179
2010-08-16 09:32:09 +00:00
Cedric BAIL aa3728b3f5 * eina: preparing clean removal of eina threadsafe data type.
SVN revision: 51173
2010-08-16 09:00:42 +00:00
Carsten Haitzler f4b68549cb formatting. ok - maybe we can have a debate on it, but its better than
it was before. debate up for grabs for now. wont touch other lib
headers until resolved for eina. it's the worst anyway.



SVN revision: 51156
2010-08-16 06:14:19 +00:00
Carsten Haitzler c747bfaadb well got to start somewhere. eina 1.0.0 alpha readied. need to go over
code formatting still (headers specifically). bring doc building
in-line with other efl libs. README is useful now. Changelog waiting
to be filled in for 1.0.0



SVN revision: 51154
2010-08-16 05:40:50 +00:00
Tom Hacohen 063d8ffd64 Eina: Fixed usage of EINA_CONST, the lack of EINA_PURE and EINA_WARN_UNUSED_RESULT and formatting in the following headers:
1. eina_unicode.h
2. eina_strbuf.h eina_ustrbuf.h
3. eina_stringshare.h eina_ustringshare.h eina_binshare.h


SVN revision: 51128
2010-08-15 09:01:16 +00:00
Mike Blumenkrantz ad00478247 fix threadsafe api
SVN revision: 51118
2010-08-14 16:10:19 +00:00
Cedric BAIL 3b269d6f04 * eina: don't direct people in the wrong direction.
SVN revision: 51117
2010-08-14 15:50:07 +00:00
Mike Blumenkrantz 689a24559c add threadsafety for hashes
SVN revision: 51106
2010-08-14 03:05:35 +00:00
Mike Blumenkrantz f973f8c72a add #ifdefs for some threadsafety stuff
cedric SPANK SPANK SPANK!!!


SVN revision: 51105
2010-08-14 03:03:32 +00:00
Iván Briano 02031b60bf Remark that data being deleted from the hash will be mercilessly killed if a blackops free function was given to the hash on creation.
SVN revision: 51079
2010-08-13 14:34:36 +00:00
Mike Blumenkrantz c8f669a27f more variable renames, null check alloc, malloc+memset0 -> calloc, rwlocks in structs
SVN revision: 51066
2010-08-13 06:58:43 +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 3618cf1227 rename variables and typedefs to sane values
SVN revision: 51064
2010-08-13 05:22:33 +00:00
Mike Blumenkrantz bf66f6f712 go go gadget recrustify!
SVN revision: 51063
2010-08-13 01:46:14 +00:00
Cedric BAIL 731e946df7 * eina: remove debug output.
SVN revision: 51048
2010-08-12 15:11:35 +00:00
Cedric BAIL 86a21376ad * eina: report when and where memleak come from.
SVN revision: 51040
2010-08-12 14:22:22 +00:00
Tom Hacohen d2988fe707 Eina: "FIX" EINA_UNICODE_EMPTY_STRING.
SVN revision: 51038
2010-08-12 14:16:32 +00:00
Cedric BAIL a6645cb746 * eina: fix eina array threadsafe version.
Also add iterator and accessor ability to walk threadsafely.
	Rename EINA_EACH to EINA_EACH_CB to match other callback cast.


SVN revision: 51000
2010-08-11 14:32:30 +00:00
Mike Blumenkrantz 7833796e00 right...this is malloc...
SVN revision: 50963
2010-08-10 12:25:34 +00:00
Mike Blumenkrantz a7398f4e08 refcount locks to avoid deadlocks; array threadsafety should be good to go now
SVN revision: 50962
2010-08-10 12:14:59 +00:00
Mike Blumenkrantz c09c5ed690 and these
SVN revision: 50961
2010-08-10 12:05:51 +00:00
Mike Blumenkrantz a589a1bcbe and this too
SVN revision: 50960
2010-08-10 12:00:36 +00:00
Mike Blumenkrantz cbf7f7b58a array threadsafing wip, get rid of dumb undefineds from earlier
SVN revision: 50959
2010-08-10 11:57:20 +00:00
Mike Blumenkrantz 5b4ec5bd35 change EINA_ARRAY_THREADSAFE_ITER_RETURN to EINA_ARRAY_THREADSAFE_ITER_ESCAPE to match forthcoming threadsafe list api
SVN revision: 50956
2010-08-10 07:48:00 +00:00
Mike Blumenkrantz 6bc0a6cb14 errr use the right define for this
SVN revision: 50952
2010-08-10 03:37:21 +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
Mike Blumenkrantz 224f7d3b55 formatting
SVN revision: 50913
2010-08-08 20:49:26 +00:00
Mike Blumenkrantz 84faaf51fd add rwlock define to eina_config.h
SVN revision: 50911
2010-08-08 19:35:43 +00:00
Tom Hacohen ed0f5eb857 eina: fix strdup calloc, it's number of elements and then size, and not the other way around.
SVN revision: 50898
2010-08-08 12:03:18 +00:00
Cedric BAIL 476f09d29b * eina: add some doc for one big mempool.
SVN revision: 50834
2010-08-05 12:52:30 +00:00
Cedric BAIL e1d8b17d54 * eina: fix segv on NULL mempool.
SVN revision: 50833
2010-08-05 12:36:36 +00:00
Lucas De Marchi 0a4617ae38 FORMATTING
* Remove vim modelines:
 find . -name '*.[chx]' -exec sed -i '/\/\*$/ {N;N;/ \* vim:ts/d}' \{\} \;
 find . -name '*.[chx]' -exec sed -i '/\/[\*\/] *vim:/d' \{\} \;

* Remove leading blank lines:
 find . -name '*.[cxh]' -exec sed -i '/./,$!d'

If you use vim, use this in your .vimrc:
set ts=8 sw=3 sts=8 expandtab cino=>5n-3f0^-2{2(0W1st0



SVN revision: 50816
2010-08-04 16:57:32 +00:00
Gustavo Lima Chaves faa7644e22 Better documenting EINA_MAGIC_SET()'s use.
Patch by Jonas Gastal.



SVN revision: 50744
2010-08-02 16:57:38 +00:00
Brett Nash 9da847b538 Fix eina_unicode_strncpy
SVN revision: 50741
2010-08-02 09:44:11 +00:00
Brett Nash d3655ee501 Beef up the strncpy test
SVN revision: 50740
2010-08-02 09:44:06 +00:00
Brett Nash 7f83020567 Terminate the string after strcpy
SVN revision: 50739
2010-08-02 09:44:01 +00:00
Brett Nash 9e468e94e7 Update eina_unicode_strnlen
SVN revision: 50738
2010-08-02 09:43:57 +00:00
Brett Nash 4efb9d70af Add ustr tests.
SVN revision: 50737
2010-08-02 09:43:51 +00:00
Brett Nash 1e8074954f Fix end points
SVN revision: 50708
2010-07-31 05:24:45 +00:00
Brett Nash db89ba43d7 eina: Actually implement strnlen for eina_unicode.
SVN revision: 50700
2010-07-31 03:54:09 +00:00
Mike Blumenkrantz d409884148 incomplete doxy!
cedric SPANK SPANK SPANK!!!


SVN revision: 50694
2010-07-30 21:18:40 +00:00
Cedric BAIL c9d5d8a62e * eina: add a way to move a key to another without triggering the Free_Cb.
SVN revision: 50683
2010-07-30 09:06:58 +00:00
Cedric BAIL 85be5e4201 * eina: try to fix memory align on sparc.
SVN revision: 50680
2010-07-30 08:26:34 +00:00
Brett Nash 4414556323 Unicde strnlen, and a slight fix to the header so at least part can be read by
humans.

Also strlen/strnlen are pure.


SVN revision: 50676
2010-07-30 03:39:12 +00:00
Iván Briano 55baf0a4f1 DO export this thingies
SVN revision: 50645
2010-07-29 14:08:02 +00:00
Cedric BAIL 836721fc6e * eina: remove some warning.
SVN revision: 50644
2010-07-29 13:59:31 +00:00
Cedric BAIL 4010a9b18a * eina: fix wrong test in eina_big.
SVN revision: 50602
2010-07-28 18:10:53 +00:00
Tom Hacohen 713354b764 Eina: Fixed a bug in eina_*share_dump functions and fixed a documentation error.
SVN revision: 50600
2010-07-28 17:53:10 +00:00
Mike Blumenkrantz 5028d6a282 lots of doxy fixes and stop casting to char*
SVN revision: 50582
2010-07-28 03:34:25 +00:00
Mike Blumenkrantz a124fffeca start binshare
SVN revision: 50581
2010-07-28 03:33:49 +00:00
Carsten Haitzler 15c71af0a5 fix formatting also
SVN revision: 50577
2010-07-28 03:03:25 +00:00
Carsten Haitzler bed21c315d errrr... hmmm why did this change?
SVN revision: 50574
2010-07-28 02:48:11 +00:00
Carsten Haitzler ddc6ba2c2a uncrustify eina.
SVN revision: 50573
2010-07-28 02:37:05 +00:00
Tom Hacohen e6ec7adedb Eina: Fix the segfault in eina_stringshare_shutdown with-enable-amalgamation.
SVN revision: 50548
2010-07-27 16:53:49 +00:00
Tom Hacohen 32c7a50118 Eina: Fix compilation with --enable-amalgamation.
Sorry dh :P

SVN revision: 50545
2010-07-27 15:15:45 +00:00
Tom Hacohen 6b69189efd Eina: Added ustringshare and binshare tests.
Fixed a small bug in binshare (in the length function).
Moved some debug messages around.

SVN revision: 50541
2010-07-27 11:43:37 +00:00
Tom Hacohen d928a9ded8 Eina: implement the macro eina_binshare_add.
SVN revision: 50535
2010-07-27 09:41:34 +00:00
Tom Hacohen 279da003e0 Eina: Added Eina_UStrbuf.
Same as Eina_Strbuf but for Eina_Unicode strings.

SVN revision: 50534
2010-07-27 09:05:41 +00:00
Tom Hacohen 3675a5f02b Eina: Add Eina_UStringshare and Eina_Binshare.
Also modified Eina_Stringshare to share most of the code with the two above.
Added Magics for Eina_UStrbuf as well as for UStringshare/Binshare.

SVN revision: 50533
2010-07-27 08:55:23 +00:00
Tom Hacohen 270f765c91 Eina: Added Eina_Unicode.
SVN revision: 50532
2010-07-27 08:22:20 +00:00
Nicolas Aguirre c024369336 Use INF only when it's defined. Fix a warning during eina compilation.
SVN revision: 50512
2010-07-26 16:17:11 +00:00
Cedric BAIL 25ffaac60f * eina: actually add the directory too.
SVN revision: 50511
2010-07-26 15:58:18 +00:00
Cedric BAIL 07ad9d5139 * eina: add a mempool that just do one big malloc.
SVN revision: 50510
2010-07-26 15:52:43 +00:00
Cedric BAIL 21f5dec9d3 * eina: SPANK SPANK SPANK !
SVN revision: 50509
2010-07-26 09:31:40 +00:00
Mike Blumenkrantz dd2dc39bff this was supposed to go with the last commit...
SVN revision: 50502
2010-07-26 05:09:20 +00:00
Mike Blumenkrantz f3ad2982b8 +eina_stringshare_vprintf for using a va_list
SVN revision: 50501
2010-07-26 05:09:02 +00:00
Brett Nash 8b858d5f7b Use offsetof rather the manual pointer compares. C89 can be taken as given I
think.  Also update authors to add Mwa, and fix copyright statement to be
useful.  (Always list years, not ranges of years... longer, but covered by
	international conventions).


SVN revision: 50500
2010-07-26 04:21:47 +00:00
Mike Blumenkrantz e43175fa37 add doxy
SVN revision: 50491
2010-07-25 19:32:03 +00:00
Mike Blumenkrantz 7ff1096672 +eina_stringshare_printf
+eina_stringshare_nprintf
the long awaited printf functions for stringshare!


SVN revision: 50490
2010-07-25 19:18:26 +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
Mike Blumenkrantz 846e224fd2 +eina_str_toupper for completion
SVN revision: 50483
2010-07-25 02:03:10 +00:00
Mike Blumenkrantz 2f183fa194 eina_hash_modify_or_add -> eina_hash_set
SVN revision: 50448
2010-07-23 13:04:21 +00:00
Mike Blumenkrantz 55f0882da4 revert previous. why would I do that in the first place?
SVN revision: 50407
2010-07-21 05:02:17 +00:00
Mike Blumenkrantz 50e621c5c2 remove tolower() from eina_str_tolower
SVN revision: 50404
2010-07-21 03:59:37 +00:00
Mike Blumenkrantz 489cae4eee +eina_hash_modify_or_add to always add a value to the hash at the specified key
SVN revision: 50402
2010-07-21 03:15:39 +00:00
Cedric BAIL 9660c1c66f * eina: fix tolower call.
SVN revision: 50366
2010-07-19 11:25:10 +00:00
Mike Blumenkrantz f18e1899e5 +eina_str_tolower for lowercasing an entire string in one line
SVN revision: 50361
2010-07-19 01:56:42 +00:00
Mike Blumenkrantz 0c983ac8d8 dox fixes
SVN revision: 50355
2010-07-18 18:59:01 +00:00
Mike Blumenkrantz c146935917 +eina_stringshare_replace_length to replace a stringshared string with a given length of another string
SVN revision: 50320
2010-07-18 07:39:21 +00:00
Mike Blumenkrantz 9dcd70a33d and macro whoops
SVN revision: 50319
2010-07-18 06:48:08 +00:00
Mike Blumenkrantz 8e56225323 attribute whoops
SVN revision: 50318
2010-07-18 06:45:22 +00:00
Mike Blumenkrantz 02ef2d58e5 small patch from andmils in #e; fixes compile on freebsd
SVN revision: 50317
2010-07-18 06:38:23 +00:00
Mike Blumenkrantz 9276378041 +eina_strbuf_string_free to free string in strbuf without freeing strbuf
SVN revision: 50316
2010-07-18 06:21:50 +00:00
Mike Blumenkrantz d3982d4b5c +eina_hash_free_buckets to free buckets without freeing a hash
SVN revision: 50315
2010-07-18 04:24:24 +00:00
Mike Blumenkrantz af32bf04f0 well this was just plain wrong
SVN revision: 50314
2010-07-18 03:55:53 +00:00
Mike Blumenkrantz 7d3bf122ac on the fifth day the rasterman said "let there be docs for hash tables!"
but there were no docs for hash tables because k-s and cedric were busy writing new functions for hash tables. so rasterman again said "let there be docs for hash tables! really guys, I mean it this time!"
and this time there were docs, but these docs were incomplete and in some places vague and misleading.
these docs frustrated little discomfitor, who had just healed up after learning to ride his edje bicycle and was just starting to read. so he read all that he could, and then he started to write. he wrote his little heart out until finally there were more docs for hash tables like the rasterman had wanted.
then he went and got ice cream.

The End.


SVN revision: 50313
2010-07-18 03:29:10 +00:00
Lucas De Marchi 749cc7478c Remove unneeded code with notnull.cocci script
This continues previous commit with more complex places, where it required
more than just removing some "ifs".



SVN revision: 50242
2010-07-14 02:20:30 +00:00
Vincent Torri c7bb6d41f5 include sys/syslimits.h on mac os x for PATH_MAX and NAME_MAX
i really dislike having PATH_MAX in a header file...



SVN revision: 50231
2010-07-13 19:17:35 +00:00
Vincent Torri 84efd3507f leak--, thanks cedric
SVN revision: 50225
2010-07-13 16:43:15 +00:00
Vincent Torri 971f0800ca useless headers now
SVN revision: 50221
2010-07-13 13:57:21 +00:00
Vincent Torri c97a897584 use Win32 native mutex on Windows. To use it, pass the following option
to configure:

--enable-win32-threads

By default, pthreads are used


SVN revision: 50220
2010-07-13 13:51:00 +00:00
Vincent Torri 9f425c5892 make it compile on Windows
SVN revision: 50219
2010-07-13 13:08:14 +00:00
Vincent Torri fd59d59930 newline --
SVN revision: 50218
2010-07-13 12:49:37 +00:00
Vincent Torri c012d2e7f6 fix compilation on Windows
SVN revision: 50179
2010-07-11 11:52:43 +00:00
Lucas De Marchi 442fe3afae Add missing macros
Add missing EINA_SAFETY_ON_NULL_GOTO and define all the *GOTOs macros when
safety checks are disabled.



SVN revision: 50138
2010-07-09 03:27:04 +00:00
Lucas De Marchi b07f70b85c Update doc of eina_str_split functions
Mention that they can return NULL in case malloc() fails.



SVN revision: 50127
2010-07-08 15:08:31 +00:00