Re: com php-src: reduced struct sizes by 8 byte each on 64 bit: ext/standard/filters.c
| From: | Anatol Belski | Date: | Sat, 13 Sep 2014 21:56:43 +0000 |
| Subject: | Re: com php-src: reduced struct sizes by 8 byte each on 64 bit: ext/standard/filters.c | ||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-81569@lists.php.net to get a copy of this message | ||
On Sat, September 13, 2014 23:46, Nikita Popov wrote:
> On Sat, Sep 13, 2014 at 11:21 PM, Anatol Belski <ab@php.net> wrote:
>
>
>> Commit: 47fb7a46ac1ff29b065fd5e46b0c3174e7e2b2a0
>> Author: Anatol Belski <ab@php.net> Sat, 13 Sep 2014 17:47:42
>> +0200
>> Parents: d578e351a938acc26382e759c21fe09862f8ba2a
>> Branches: master
>>
>>
>> Link:
>>
>> http://git.php.net/?p=php-src.git;a=commitdiff;h=47fb7a46ac1ff29b065fd5e
>> 46b0c3174e7e2b2a0
>>
>>
>> Log:
>> reduced struct sizes by 8 byte each on 64 bit
>>
>> Changed paths:
>> M ext/standard/filters.c
>>
>>
>>
>> Diff:
>> diff --git a/ext/standard/filters.c b/ext/standard/filters.c index
>> 7f48121..d2267c9 100644
>> --- a/ext/standard/filters.c
>> +++ b/ext/standard/filters.c
>> @@ -322,14 +322,15 @@ struct _php_conv {
>> typedef struct _php_conv_base64_encode { php_conv _super;
>>
>> - unsigned char erem[3];
>> + const char *lbchars;
>> + size_t lbchars_len;
>> size_t erem_len; unsigned int line_ccnt; unsigned int line_len; -
>> const char *lbchars; int lbchars_dup; - size_t lbchars_len;
>> int persistent; + unsigned char erem[3];
>> + unsigned char dummy_pad[1]; /* one padding byte which can be
>> replaced if there were another 1 byte member*/ } php_conv_base64_encode;
>>
>>
>
> Why is this padding member necessary here? Padding will be there anyways.
>
>
yeah, can be removed. Just for more visibility as that's an unusual case
in the code base :) Will remove.
Regards
Anatol