Skip to content

Conversation

@theuni
Copy link
Member

@theuni theuni commented Jan 21, 2015

This makes it easier for us to replace it if desired, since it's now only in one spot. Also, it avoids the openssl include from allocators.h, which essentially forced openssl to be included from every compilation unit.

Also a few minor header cleanups.

I'm not a big fan of putting a single function in this object, but we use it at such low levels (allocators.h) that i don't want to stick it somewhere that would pull in other headers. Suggestions welcome.

@laanwj
Copy link
Member

laanwj commented Jan 21, 2015

Concept ACK.

I'm not against one function per object if that makes sense but let's not put all of these at the top level. For organizational purposes could put it in a subdirectory below src, e.g. support or util.

@theuni
Copy link
Member Author

theuni commented Jan 29, 2015

Sorry for the lack of response. I've been putting this off because this is part of a larger reorganization, and I figured I'd wait until it took shape before moving it somewhere since I'm not sure how it will end up looking. Right now, it'd make sense to move this along with the string/time/etc utils to some utils/ dir, but I'd also like to keep the consensus/app-specific stuff segregated in some way.

@theuni
Copy link
Member Author

theuni commented Feb 6, 2015

@laanwj After looking working on a refactor including this for a while, I still don't really have a good place for it. How about leaving it at the top for now and moving it to support/util when there's more stuff that can go there? For ex, we may consider moving random.o and other remaining openssl users into there, so that we have a more straightforward path to removal.

Otherwise, I'm happy to move it to whereever you prefer.

@laanwj
Copy link
Member

laanwj commented Feb 9, 2015

Well we are in the process of moving source files from the top level, so I'm not that happy to create more there. As for "let's move it later". If we know we are going to move it I prefer to create it in the right place (this avoids extra rebases as well as diff noise). I don't mind if this is the only file in support/ for now.

@theuni
Copy link
Member Author

theuni commented Feb 9, 2015

Ok, will do.

@theuni
Copy link
Member Author

theuni commented Feb 9, 2015

moved and rebased.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 spaces indentation, pretty please?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grr.. still haven't managed to completely break this habit. Will fix.

@sipa
Copy link
Member

sipa commented Feb 14, 2015

utACK

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Can you add a new-line here please?

@Diapolo
Copy link

Diapolo commented Feb 14, 2015

utACK after fixing the comments.

@theuni
Copy link
Member Author

theuni commented Feb 15, 2015

Nits addressed.

This makes it easier for us to replace it if desired, since it's now only in
one spot. Also, it avoids the openssl include from allocators.h, which
essentially forced openssl to be included from every compilation unit.
@Diapolo
Copy link

Diapolo commented Feb 15, 2015

Thanks, utACK!

@sipa
Copy link
Member

sipa commented Feb 16, 2015

utACK

1 similar comment
@laanwj
Copy link
Member

laanwj commented Feb 19, 2015

utACK

@laanwj laanwj merged commit 1630219 into bitcoin:master Feb 19, 2015
laanwj added a commit that referenced this pull request Feb 19, 2015
1630219 openssl: abstract out OPENSSL_cleanse (Cory Fields)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants