Commit 299bfa9c authored by Niels Möller's avatar Niels Möller

Use STATIC_HEADER and STACK_HEADER where appropriate.

Rev: src/crypto.c:1.10
Rev: src/io.c:1.17
Rev: src/lsh_types.h:1.14
Rev: src/read_line.c:1.12
parent 9bec5984
......@@ -147,7 +147,7 @@ static struct hash_instance *make_sha_instance(struct hash_algorithm *ignored)
}
struct hash_algorithm sha_algorithm =
{ STATIC_HEADER
{ STATIC_HEADER,
SHA_DATASIZE, SHA_DIGESTSIZE, make_sha_instance };
/* HMAC (rfc-2104) */
......
......@@ -252,7 +252,7 @@ static int io_iter(struct io_backend *b)
int res;
struct fd_read r =
{ { STATIC_HEADER do_read }, fd->fd };
{ { STACK_HEADER do_read }, fd->fd };
/* The handler function may install a new handler */
res = READ_HANDLER(fd->handler,
......
......@@ -104,8 +104,8 @@ struct lsh_string_header
int magic;
};
#define STATIC_HEADER { 0, LSH_ALLOC_STATIC, 0 },
#define STACK_HEADER { 0, LSH_ALLOC_STACK, 0 },
#define STATIC_HEADER { 0, LSH_ALLOC_STATIC, 0 }
#define STACK_HEADER { 0, LSH_ALLOC_STACK, 0 }
#else /* !DEBUG_ALLOC */
struct lsh_object
......@@ -116,8 +116,8 @@ struct lsh_object
struct lsh_string_header {};
#define STATIC_HEADER { LSH_ALLOC_STATIC, 0 },
#define STACK_HEADER { LSH_ALLOC_STACK, 0 },
#define STATIC_HEADER { LSH_ALLOC_STATIC, 0 }
#define STACK_HEADER { LSH_ALLOC_STACK, 0 }
#endif /* !DEBUG_ALLOC */
......
......@@ -125,7 +125,7 @@ static int do_read_line(struct read_handler **h,
int res;
struct string_read read =
{ { STATIC_HEADER do_string_read },
{ { STACK_HEADER, do_string_read },
closure,
0 };
while(next && (read.index < closure->pos))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment