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>
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index 3a1b1a2..0045284 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h
@@ -4132,7 +4132,7 @@ } 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_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
diff --git a/util/doc.go b/util/doc.go index 23cd5f4..48d65eb 100644 --- a/util/doc.go +++ b/util/doc.go
@@ -237,6 +237,10 @@ 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 @@ } 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