1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Use bitfields for booleans in struct cookie to save space.

This commit is contained in:
hniksic 2005-06-21 18:45:08 -07:00
parent 80c3fa1223
commit 40c07f3e04
2 changed files with 13 additions and 7 deletions

View File

@ -1,3 +1,9 @@
2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
* cookies.c (struct cookie): Use 1-bit bitfields for booleans
which makes the structure takes less space at no cost in
complexity.
2005-06-22 Hrvoje Niksic <hniksic@xemacs.org> 2005-06-22 Hrvoje Niksic <hniksic@xemacs.org>
* Makefile.in ($(OBJ)): Add the config.h dependency. * Makefile.in ($(OBJ)): Add the config.h dependency.

View File

@ -98,21 +98,21 @@ struct cookie {
int port; /* port number */ int port; /* port number */
char *path; /* path prefix of the cookie */ char *path; /* path prefix of the cookie */
int secure; /* whether cookie should be unsigned discard_requested :1; /* whether cookie was created to
request discarding another
cookie. */
unsigned secure :1; /* whether cookie should be
transmitted over non-https transmitted over non-https
connections. */ connections. */
int domain_exact; /* whether DOMAIN must match as a unsigned domain_exact :1; /* whether DOMAIN must match as a
whole. */ whole. */
int permanent; /* whether the cookie should outlive int permanent :1; /* whether the cookie should outlive
the session. */ the session. */
time_t expiry_time; /* time when the cookie expires, 0 time_t expiry_time; /* time when the cookie expires, 0
means undetermined. */ means undetermined. */
int discard_requested; /* whether cookie was created to
request discarding another
cookie. */
char *attr; /* cookie attribute name */ char *attr; /* cookie attribute name */
char *value; /* cookie attribute value */ char *value; /* cookie attribute value */