Hide some sections from the docs.

Private structs shouldn't be shown. Also there's a few sections that are
really more implementation details than anything else.

Change-Id: Ibc5a23ba818ab0531d9c68e7ce348f1eabbcd19a
Reviewed-on: https://boringssl-review.googlesource.com/6313
Reviewed-by: Adam Langley <alangley@gmail.com>
This commit is contained in:
David Benjamin 2015-10-18 00:10:28 -04:00 committed by Adam Langley
parent 63006a913b
commit 5ef619ef2a
2 changed files with 7 additions and 3 deletions

View File

@ -4132,7 +4132,7 @@ typedef struct ssl3_state_st {
} SSL3_STATE;
/* Android compatibility section.
/* Android compatibility section (hidden).
*
* These functions are declared, temporarily, for Android because
* wpa_supplicant will take a little time to sync with upstream. Outside of
@ -4147,7 +4147,7 @@ OPENSSL_EXPORT int SSL_set_session_ticket_ext_cb(SSL *s, void *cb, void *arg);
OPENSSL_EXPORT int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method);
/* Preprocessor compatibility section.
/* Preprocessor compatibility section (hidden).
*
* Historically, a number of APIs were implemented in OpenSSL as macros and
* constants to 'ctrl' functions. To avoid breaking #ifdefs in consumers, this

View File

@ -237,6 +237,10 @@ func sanitizeAnchor(name string) string {
return strings.Replace(name, " ", "-", -1)
}
func isPrivateSection(name string) bool {
return strings.HasPrefix(name, "Private functions") || strings.HasPrefix(name, "Private structures") || strings.Contains(name, "(hidden)")
}
func (config *Config) parseHeader(path string) (*HeaderFile, error) {
headerPath := filepath.Join(config.BaseDirectory, path)
@ -341,7 +345,7 @@ func (config *Config) parseHeader(path string) (*HeaderFile, error) {
}
section.Preamble = comment
section.IsPrivate = len(comment) > 0 && strings.HasPrefix(comment[0], "Private functions")
section.IsPrivate = len(comment) > 0 && isPrivateSection(comment[0])
section.Anchor = anchor
lines = rest[1:]
lineNo = restLineNo + 1