mirror of
https://github.com/curl/curl.git
synced 2026-08-25 07:33:36 +03:00
Curl_chunker: shrink the struct
... by removing a field, converting the hex index into a byte and rearranging the order. Cuts it down from 48 bytes to 32 on x86_64. Closes #6527
This commit is contained in:
parent
a705f28bb3
commit
5ad377718d
3 changed files with 11 additions and 15 deletions
|
|
@ -48,7 +48,7 @@ typedef enum {
|
|||
big deal. */
|
||||
CHUNK_POSTLF,
|
||||
|
||||
/* Used to mark that we're out of the game. NOTE: that there's a 'dataleft'
|
||||
/* Used to mark that we're out of the game. NOTE: that there's a 'datasize'
|
||||
field in the struct that will tell how many bytes that were not passed to
|
||||
the client in the end of the last buffer! */
|
||||
CHUNK_STOP,
|
||||
|
|
@ -83,11 +83,10 @@ typedef enum {
|
|||
const char *Curl_chunked_strerror(CHUNKcode code);
|
||||
|
||||
struct Curl_chunker {
|
||||
char hexbuffer[ CHUNK_MAXNUM_LEN + 1]; /* +1 for null-terminator */
|
||||
int hexindex;
|
||||
ChunkyState state;
|
||||
curl_off_t datasize;
|
||||
size_t dataleft; /* untouched data amount at the end of the last buffer */
|
||||
ChunkyState state;
|
||||
unsigned char hexindex;
|
||||
char hexbuffer[ CHUNK_MAXNUM_LEN + 1]; /* +1 for null-terminator */
|
||||
};
|
||||
|
||||
/* The following functions are defined in http_chunks.c */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue