[openssl-dev] [openssl.org #4460] [PATCH] BIO_METHODs should be const
done with commit 04f6b0f. Thanks ! -- Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4460 Please log in as guest with password guest if prompted -- openssl-dev mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Re: [openssl-dev] [openssl.org #4460] [PATCH] BIO_METHODs should be const
On Sun, Mar 20, 2016 at 6:20 PM, David Benjamin via RTwrote: > Patch attached. This is a mechanical change. BIO_new takes a non-const > BIO_METHOD and the various BIO_METHODs defined in the library are also > non-const, so they don't get placed in .rodata. > > The change to BIO_new and the BIO struct should be source-compatible. > Fixing the in-library BIO_METHODs is not. This will work as-is: > BIO *bio = BIO_new(BIO_s_mem()); > This will not: > BIO_METHOD *method = BIO_s_mem(); > BIO *bio = BIO_new(method); > (method would have to be const.) > > If this is a concern, I can split out just the BIO_new change (so that > external BIO_METHODs may be const without requiring casts). It would be > nice to put the in-library BIOs in .rodata too, but then functions like > BIO_s_mem would need to cast away const-ness internally. Happy to switch it > to whichever is preferable. +1 for getting const-ness in order. The const-ness issues have been around a long time. They should be sorted out before the 1.1.0 release. The major version bump is precisely the time when it should occur. Jeff -- Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4460 Please log in as guest with password guest if prompted -- openssl-dev mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Re: [openssl-dev] [openssl.org #4460] [PATCH] BIO_METHODs should be const
On Sun, Mar 20, 2016 at 6:20 PM, David Benjamin via RTwrote: > Patch attached. This is a mechanical change. BIO_new takes a non-const > BIO_METHOD and the various BIO_METHODs defined in the library are also > non-const, so they don't get placed in .rodata. > > The change to BIO_new and the BIO struct should be source-compatible. > Fixing the in-library BIO_METHODs is not. This will work as-is: > BIO *bio = BIO_new(BIO_s_mem()); > This will not: > BIO_METHOD *method = BIO_s_mem(); > BIO *bio = BIO_new(method); > (method would have to be const.) > > If this is a concern, I can split out just the BIO_new change (so that > external BIO_METHODs may be const without requiring casts). It would be > nice to put the in-library BIOs in .rodata too, but then functions like > BIO_s_mem would need to cast away const-ness internally. Happy to switch it > to whichever is preferable. +1 for getting const-ness in order. The const-ness issues have been around a long time. They should be sorted out before the 1.1.0 release. The major version bump is precisely the time when it should occur. Jeff -- openssl-dev mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
[openssl-dev] [openssl.org #4460] [PATCH] BIO_METHODs should be const
Patch attached. This is a mechanical change. BIO_new takes a non-const BIO_METHOD and the various BIO_METHODs defined in the library are also non-const, so they don't get placed in .rodata. The change to BIO_new and the BIO struct should be source-compatible. Fixing the in-library BIO_METHODs is not. This will work as-is: BIO *bio = BIO_new(BIO_s_mem()); This will not: BIO_METHOD *method = BIO_s_mem(); BIO *bio = BIO_new(method); (method would have to be const.) If this is a concern, I can split out just the BIO_new change (so that external BIO_METHODs may be const without requiring casts). It would be nice to put the in-library BIOs in .rodata too, but then functions like BIO_s_mem would need to cast away const-ness internally. Happy to switch it to whichever is preferable. David -- Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4460 Please log in as guest with password guest if prompted 0001-BIO_METHODs-should-be-const.patch Description: Binary data -- openssl-dev mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev