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
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
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
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
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
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
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
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
Cedric BAIL
07ad9d5139
* eina: add a mempool that just do one big malloc.
...
SVN revision: 50510
2010-07-26 15:52:43 +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
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