dgaudet 98/03/12 03:13:28
Modified: src/modules/standard mod_actions.c mod_auth.c mod_headers.c
mod_log_config.c mod_mime.c mod_setenvif.c
mod_userdir.c
Log:
save more memory! table_set -> table_setn transformations for those cases
where there's no need to pstrdup the arguments.
Revision Changes Path
1.23 +1 -1 apache-1.3/src/modules/standard/mod_actions.c
Index: mod_actions.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_actions.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- mod_actions.c 1998/03/12 11:02:59 1.22
+++ mod_actions.c 1998/03/12 11:13:23 1.23
@@ -121,7 +121,7 @@
static const char *add_action(cmd_parms *cmd, action_dir_config * m, char
*type,
char *script)
{
- table_set(m->action_types, type, script);
+ table_setn(m->action_types, type, script);
return NULL;
}
1.32 +1 -1 apache-1.3/src/modules/standard/mod_auth.c
Index: mod_auth.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_auth.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- mod_auth.c 1998/01/07 16:46:43 1.31
+++ mod_auth.c 1998/03/12 11:13:23 1.32
@@ -168,7 +168,7 @@
while (ll[0]) {
w = getword_conf(sp, &ll);
if (!strcmp(w, user)) {
- table_set(grps, group_name, "in");
+ table_setn(grps, pstrdup(p, group_name), "in");
break;
}
}
1.14 +3 -3 apache-1.3/src/modules/standard/mod_headers.c
Index: mod_headers.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_headers.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- mod_headers.c 1998/03/12 11:03:02 1.13
+++ mod_headers.c 1998/03/12 11:13:24 1.14
@@ -206,13 +206,13 @@
header_entry *hdr = &((header_entry *) (headers->elts))[i];
switch (hdr->action) {
case hdr_add:
- table_add(r->headers_out, hdr->header, hdr->value);
+ table_addn(r->headers_out, hdr->header, hdr->value);
break;
case hdr_append:
- table_merge(r->headers_out, hdr->header, hdr->value);
+ table_mergen(r->headers_out, hdr->header, hdr->value);
break;
case hdr_set:
- table_set(r->headers_out, hdr->header, hdr->value);
+ table_setn(r->headers_out, hdr->header, hdr->value);
break;
case hdr_unset:
table_unset(r->headers_out, hdr->header);
1.48 +1 -1 apache-1.3/src/modules/standard/mod_log_config.c
Index: mod_log_config.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_log_config.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- mod_log_config.c 1998/03/03 08:31:28 1.47
+++ mod_log_config.c 1998/03/12 11:13:25 1.48
@@ -828,7 +828,7 @@
if (name != NULL) {
parse_log_string(cmd->pool, fmt, &err_string);
if (err_string == NULL) {
- table_set(mls->formats, name, fmt);
+ table_setn(mls->formats, name, fmt);
}
}
else {
1.33 +1 -1 apache-1.3/src/modules/standard/mod_mime.c
Index: mod_mime.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_mime.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- mod_mime.c 1998/03/12 10:29:05 1.32
+++ mod_mime.c 1998/03/12 11:13:25 1.33
@@ -228,7 +228,7 @@
while (ll[0]) {
char *ext = getword_conf(p, &ll);
str_tolower(ext); /* ??? */
- table_set(hash_buckets[hash(ext[0])], ext, ct);
+ table_setn(hash_buckets[hash(ext[0])], ext, ct);
}
}
cfg_closefile(f);
1.17 +3 -3 apache-1.3/src/modules/standard/mod_setenvif.c
Index: mod_setenvif.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_setenvif.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- mod_setenvif.c 1998/02/23 10:53:31 1.16
+++ mod_setenvif.c 1998/03/12 11:13:26 1.17
@@ -204,13 +204,13 @@
var = getword(cmd->pool, &feature, '=');
if (*feature) {
- table_set(new->features, var, feature);
+ table_setn(new->features, var, feature);
}
else if (*var == '!') {
- table_set(new->features, var + 1, "!");
+ table_setn(new->features, var + 1, "!");
}
else {
- table_set(new->features, var, "1");
+ table_setn(new->features, var, "1");
}
}
1.31 +1 -1 apache-1.3/src/modules/standard/mod_userdir.c
Index: mod_userdir.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_userdir.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- mod_userdir.c 1998/03/12 11:03:06 1.30
+++ mod_userdir.c 1998/03/12 11:13:26 1.31
@@ -176,7 +176,7 @@
*/
while (*usernames) {
username = getword_conf(cmd->pool, &usernames);
- table_set(usertable, username, kw);
+ table_setn(usertable, username, kw);
}
return NULL;
}