summaryrefslogtreecommitdiff
path: root/tables
Commit message (Collapse)AuthorAgeFilesLines
* fixed the removal of duplicate key values in apr_table_compress() where one ↵brianp2003-06-241-3/+4
| | | | | | key has more than two values git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64550 13f79535-47bb-0310-9956-ffa450edef68
* fix some compiler warningsbrianp2003-06-241-2/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64549 13f79535-47bb-0310-9956-ffa450edef68
* Add an apr_table_compress() function to reconcile duplicatebrianp2003-06-221-292/+208
| | | | | | | | | | entries in a table, and replace the red-black trees in apr_table_overlap() with a less complex mergesort Submitted by: Joe Schaefer <joe+gmane@sunstarsys.com> Reviewed by: Brian Pane git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64547 13f79535-47bb-0310-9956-ffa450edef68
* update the name of a function in a commenttrawick2003-04-041-1/+1
| | | | | | | | Submitted by: Stas Bekman Reviewed by: Jeff Trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64473 13f79535-47bb-0310-9956-ffa450edef68
* A binary-safe patch that satisfies Jerenkrantz's original desire forwrowe2003-01-131-12/+10
| | | | | | | | more elements, but structured such that we still use the optimal platform element indexes (a machine int is generally faster than a fractional int). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64291 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright notices to 2003.thommay2003-01-012-2/+2
| | | | | | | No functional changes git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64251 13f79535-47bb-0310-9956-ffa450edef68
* Use apr_uint32_t rather than apr_size_t for the maximum hash table size.jerenkrantz2002-12-301-10/+10
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64240 13f79535-47bb-0310-9956-ffa450edef68
* Allow apr_hash to have greater than int number of elements.jerenkrantz2002-12-231-10/+11
| | | | | | | (serf_spider needs a ridiculously large hash table.) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64205 13f79535-47bb-0310-9956-ffa450edef68
* A few NOTICEs for developers modifying code, not 'XXX' developer pointers.wrowe2002-12-101-2/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64136 13f79535-47bb-0310-9956-ffa450edef68
* Fix a bug in apr_hash_merge() which caused the last entry in thetrawick2002-11-231-1/+1
| | | | | | | | | overlay has to be lost. PR: 10522 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64061 13f79535-47bb-0310-9956-ffa450edef68
* fix a typotrawick2002-09-171-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63877 13f79535-47bb-0310-9956-ffa450edef68
* Add apr_array_pop() function to apr_array_header_t.jerenkrantz2002-09-021-0/+9
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63848 13f79535-47bb-0310-9956-ffa450edef68
* zap an unused variabletrawick2002-07-291-1/+0
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63739 13f79535-47bb-0310-9956-ffa450edef68
* Optimization for apr_table_overlap(): because the destinationbrianp2002-07-271-8/+11
| | | | | | | | | | array is pre-allocated to ensure that it's big enough to hold the result table, just use simple pointer arithmetic to write to successive elements, rather than calling the array push function git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63737 13f79535-47bb-0310-9956-ffa450edef68
* Fixed a bug in apr_table_set/setn from an earlier change: entriesbrianp2002-07-271-4/+4
| | | | | | | | at the end of the table weren't being properly shifted when apr_table_set/setn removed duplicate keys (found using "testtable" in apr/test) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63735 13f79535-47bb-0310-9956-ffa450edef68
* Updated apr_table_vdo() to take advantage of the indexingbrianp2002-07-271-8/+21
| | | | | | | recently added to tables. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63734 13f79535-47bb-0310-9956-ffa450edef68
* remove an extraneous initialization left over from the last change to ↵brianp2002-07-201-1/+1
| | | | | | apr_table_unset git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63722 13f79535-47bb-0310-9956-ffa450edef68
* Added a simple index to apr_table_t to reduce the best-casebrianp2002-07-201-45/+238
| | | | | | | | | | | | | | | execution time for table lookups from O(n) to O(1). The worst-case time remains O(n), but in httpd benchmarking this indexing reduces the mean execution time of apr_table_get() by 40% and apr_table_unset() by 60%. The indexing will make it possible to speed up apr_table_vdo() and apr_table_overlap() in the future, but I haven't changed those yet. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63721 13f79535-47bb-0310-9956-ffa450edef68
* All TABS and members present of other gangs, like the dreadful trailingstriker2002-07-191-41/+44
| | | | | | | | | spaces, were killed today in a shootout with the Style Police. Another small victory, making another small patch of source a little more pleasant to spend time in. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63710 13f79535-47bb-0310-9956-ffa450edef68
* added apr_is_empty_array()brianp2002-07-131-0/+5
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63653 13f79535-47bb-0310-9956-ffa450edef68
* Changed apr_table_elts() and apr_is_empty_table() from macrosbrianp2002-07-131-0/+9
| | | | | | | to functions to make apr_table_t a fully abstract type git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63650 13f79535-47bb-0310-9956-ffa450edef68
* Additional speedup for apr_table_unset(): don't start doing thebrianp2002-07-061-6/+11
| | | | | | | | check for dst_elt!=NULL on each iteration until we've seen the first instance of the target key git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63580 13f79535-47bb-0310-9956-ffa450edef68
* Optimized apr_table_unset(): the loop is now O(n) instead ofbrianp2002-07-051-20/+14
| | | | | | | O(n^2) in the worst case git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63575 13f79535-47bb-0310-9956-ffa450edef68
* Optimized the apr_table_set* functions, and updated a variable namebrianp2002-07-051-71/+58
| | | | | | | in apr_table_get() for consistency git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63573 13f79535-47bb-0310-9956-ffa450edef68
* Streamlined the code for apr_table_get()brianp2002-07-051-5/+6
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63571 13f79535-47bb-0310-9956-ffa450edef68
* Moved the definition of apr_table_t's internals from apr_tables.hbrianp2002-07-051-0/+15
| | | | | | | to apr_tables.c to strengthen its encapsulation git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63570 13f79535-47bb-0310-9956-ffa450edef68
* yikes, didn't even notice those tabs there.jwoolley2002-06-281-8/+8
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63532 13f79535-47bb-0310-9956-ffa450edef68
* A compromise for now: changing the return type of apr_table_do() andjwoolley2002-06-281-7/+47
| | | | | | | | | | apr_table_vdo() to return int instead of void so that the caller can know whether or not any of the iterations trigged an "early return". However, I've left the wacky old semantics of _vdo for a while. This solves my immediate need at least. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63531 13f79535-47bb-0310-9956-ffa450edef68
* Introduce apr_table_do_callback_fn_t as a prototype declaration, andwrowe2002-06-281-4/+5
| | | | | | | | | consistify all broken APR_DECLARE() prototypes that were, in fact, always handled as APR_DECLARE_NONSTD() by the MSVC compiler. Unfortunately, no emit is raised when the compiler ignores our APR_DECLARE() semantic. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63527 13f79535-47bb-0310-9956-ffa450edef68
* Why was this in there? It generates a warning (deprecated header file)jwoolley2002-06-111-3/+0
| | | | | | | on FreeBSD 4.6-RC. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63493 13f79535-47bb-0310-9956-ffa450edef68
* Add .deps to cvsignore since APR may now generate .deps files.jerenkrantz2002-04-221-0/+1
| | | | | | | (somehow CVS ignored updating these on the last commit.) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63287 13f79535-47bb-0310-9956-ffa450edef68
* Allow VPATH builds to properly generate build dependencies. This requiresjerenkrantz2002-04-221-0/+2
| | | | | | | | | | | | srcdir to always be available in a Makefile, so we need to stop adding this only when we use VPATH. Change the dependency generation to use .deps instead of appending to the Makefile. This makes us consistent with the dependency style of httpd-2.0. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63286 13f79535-47bb-0310-9956-ffa450edef68
* Update our copyright for this year.fielding2002-03-132-2/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63117 13f79535-47bb-0310-9956-ffa450edef68
* Optimized away the initialization of newly allocated tablebrianp2002-03-101-3/+22
| | | | | | | | | | | elements to NULL in table_push(), because this data always gets overwritten immediately after the table_push() call. Also eliminated the zero-fill of bytes that are immediately overwritten in the branch of apr_array_push() that resizes the array. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63099 13f79535-47bb-0310-9956-ffa450edef68
* Update debug-only code (with invalid #ifdefs anyway) to use apr_pool_find.jerenkrantz2002-02-131-6/+6
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62982 13f79535-47bb-0310-9956-ffa450edef68
* for the call to apr_table_overlap where it has no work to do:trawick2002-01-181-0/+12
| | | | | | | | | | | | | | | avoid some logic in apr_table_overlap which dies with APR_POOL_DEBUG+ElectricFence since it tries to alloc zero bytes it is useful to bail out early anyway to avoid some needless function calls and other Requesting CGI scripts through Apache causes such a call (maybe just for HTTP/0.9? I dunno.). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62808 13f79535-47bb-0310-9956-ffa450edef68
* fix segv in apr_table_overlapianh2001-12-091-0/+1
| | | | | | | | | | | | This patch fixes a bug in apr_table_overlap: when using the APR_OVERLAP_TABLES_SET option, the red-black tree's shape properties were sometimes broken, which could cause a segfault if it happened at the root node of the tree. Obtained from: Brian Pane git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62612 13f79535-47bb-0310-9956-ffa450edef68
* optimize the apr_array_copy call by remvoing the zero fillianh2001-12-081-1/+5
| | | | | | | | | Thanks Brian! Obtained from: Brian Pane <bpane@pacbell.net> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62611 13f79535-47bb-0310-9956-ffa450edef68
* Begone ye festering warning.fielding2001-11-261-1/+0
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62554 13f79535-47bb-0310-9956-ffa450edef68
* Speed up table operations.ianh2001-11-261-150/+377
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a cache to each element in an apr_table_t. The cache consists of a 32-bit int containing the first 4 bytes of the element's key, converted to uppercase. This makes it possible to replace strcasecmp calls with inline integer comparisons. If the integer comparison fails, we can skip the strcasecmp. If the integer comparison succeeds, we can at least skip the first 4 bytes of the strcmp. In the httpd, this roughly doubles the speed of the apr_table_get and apr_table_setn operations. * A rewrite of apr_table_overlap() that uses a red-black tree instead of qsort * Cliff's faster version of the prefix computation macro * apr_palloc instead of apr_pcalloc for creating the array inside a table an important note: * This patch increases the size of the apr_table_entry_t struct, so it requires a "make clean." Submitted by: Brian Pane <bpane@pacbell.net> Reviewed by: Ian Holsman, Cliff Woolley git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62547 13f79535-47bb-0310-9956-ffa450edef68
* This patch speeds up the apr_hash_t implementation'sianh2001-11-211-5/+11
| | | | | | | | | | | | | | | | | handling of APR_HASH_KEY_STRING. The original logic was: call strlen to get the length of the key; then iterate through the key to compute the hash; This patch combines the two into a single pass. It also changes apr_pool_userdata_get() to take advantage of this optimization. Submitted by: Brian Pane <BPane@pacbell.net> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62535 13f79535-47bb-0310-9956-ffa450edef68
* Remove a compiler warning.rbb2001-11-101-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62496 13f79535-47bb-0310-9956-ffa450edef68
* Add 2 new hash functions.ianh2001-11-091-19/+97
| | | | | | | | | | | | apr_hash_copy & apr_hash_merge. the merge function allows for a callback if both hash's have the same value this changes the overlay function so that it calls the 'merge' Submitted by: Brian Pane <bpane@pacbell.net> Reviewed by: Ian Holsman git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62493 13f79535-47bb-0310-9956-ffa450edef68
* The find_entry() function in apr_hash.c is responsible for overjerenkrantz2001-09-061-1/+2
| | | | | | | | | | | | | half the apr_pcalloc() calls in the httpd. The calloc call is somewhat wasteful in this context; 4 of the 5 fields in the allocated struct get overwritten immediately. Thus the following patch replaces the calloc with an alloc and sets the one necessary field to NULL. Submitted by: Brian Pane <bpane@pacbell.net> Reviewed by: Justin Erenkrantz git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62292 13f79535-47bb-0310-9956-ffa450edef68
* Now I _know_ how long it's been since someone actually was _really_wrowe2001-08-022-3/+3
| | | | | | | testing these goodies ;) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62081 13f79535-47bb-0310-9956-ffa450edef68
* Provide every hash a private, internal iterator for internal reconstructionwrowe2001-08-021-17/+21
| | | | | | | and merging operations. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62077 13f79535-47bb-0310-9956-ffa450edef68
* Quell a slow leak. The iterator's allocation is NOT pertinant to the hash!wrowe2001-08-021-2/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62076 13f79535-47bb-0310-9956-ffa450edef68
* Almost used this when I thought our contents were going out of context.wrowe2001-08-011-0/+2
| | | | | | | | Turns out the hash contents were really corrupted by a request merge, but heck, this is still useful. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62075 13f79535-47bb-0310-9956-ffa450edef68
* Some formatting changes, no code change.dreid2001-07-191-7/+7
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61969 13f79535-47bb-0310-9956-ffa450edef68
* Add apr_hash_overlay function in the spirit of apr_table_overlay.jerenkrantz2001-07-191-0/+55
| | | | | | | | | | | | | | Also add testhash.c program to test the proper operation of the hash functions. I (Justin) did the following things to Ian's patch as posted: - Reformatted to fit APR coding style. - Fixed comment in apr_hash.h (swapped base and overlay) - Also reformat the test/Makefile.in while I'm at it Submitted by: Ian Holsman <ianh@cnet.com> Reviewed by: Justin Erenkrantz, Brian Pane <bpane@pacbell.net> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61966 13f79535-47bb-0310-9956-ffa450edef68