chiark / gitweb /
documentation/python: poison entry types that shouldn't go into search.
authorVladimír Vondruš <mosra@centrum.cz>
Tue, 27 Aug 2019 20:34:03 +0000 (22:34 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Wed, 28 Aug 2019 20:34:06 +0000 (22:34 +0200)
Spent a while using OVERLOADED_FUNCTION in a few places just to discover
it wasn't meant to be used there.

documentation/python.py

index d494e642b7917b590b27e224cb783f767322e9e7..235620b578086b6be953ec3fc087747e7fa062a1 100755 (executable)
@@ -73,15 +73,16 @@ class EntryType(Enum):
     ENUM_VALUE = 7
     DATA = 8
 
-    # Types not exposed to search are below
+    # Types not exposed to search are below. Deliberately set to large values
+    # so their accidental use triggers assertions when building search data.
 
     # One of files from special_pages. Doesn't make sense to include in the
     # search.
-    SPECIAL = 9
+    SPECIAL = 99
     # Denotes a potentially overloaded pybind11 function. Has to be here to
     # be able to distinguish between zero-argument normal and pybind11
     # functions. To search it's exposed as FUNCTION.
-    OVERLOADED_FUNCTION = 10
+    OVERLOADED_FUNCTION = 100
 
 # Order must match the EntryType above
 search_type_map = [