header-only:补 include guard;release 只发头 - #2
Merged
Merged
Conversation
- blockmalloc.h 缺 include guard → 二次 include 时 static inline 重定义 (slotsboxmalloc 的实现体内部会再 include 它) - release 不再打包 .so:本库定位是单头文件(#define BLOCKMALLOC_IMPLEMENTATION),消费者把实现体编进自己的 TU Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更
1. 补 include guard(必须)
blockmalloc.h原本没有 include guard;slotsboxmalloc 的实现体内部会再 include 它,二次 include 时static inline(cpu_relax/spin_lock/…)直接重定义报错 —— 这是 header-only 用法的前提。加
#pragma once后,kvspace-c 走单头文件模式编译通过。2. release 只发头
本库定位是单头文件(
#define BLOCKMALLOC_IMPLEMENTATION),release 不再打包.so。消费者把实现体编进自己的 TU。🤖 Generated with Claude Code