]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Minor] Move HTML shingles implementation to separate C++ file
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 4 Oct 2025 10:12:57 +0000 (11:12 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 4 Oct 2025 10:12:57 +0000 (11:12 +0100)
commit48fe5e7cf97c360ca7dd6003d214c7866c65e87f
tree1b3581206de0e2ceb3670b52d444dd38dc1be3f9
parent334d78d1c78c28bd8a0cc9ed1247711a9fba860c
[Minor] Move HTML shingles implementation to separate C++ file

The HTML shingles code requires C++ (html_content, std::variant, etc.)
but was placed in #ifdef __cplusplus block in shingles.c (a C file),
causing linker errors.

Solution: Move all HTML-specific code to shingles_html.cxx which is
compiled as C++ and properly exports symbols with extern "C" linkage.

Files:
- shingles.c: Keep only C code (text/image shingles)
- shingles_html.cxx: New file with HTML shingles implementation
- CMakeLists.txt: Add shingles_html.cxx to build
src/libutil/CMakeLists.txt
src/libutil/shingles.c
src/libutil/shingles_html.cxx [new file with mode: 0644]