refactor: rename PIP_NO_\* to PIP_HAS_\* with inverted logic
All feature flags now use positive naming (enabled by default): - PIP_HAS_FILESYSTEM, PIP_HAS_THREADS, PIP_HAS_SOCKET - PIP_HAS_PROCESS, PIP_HAS_DYNLIB, PIP_HAS_FFT, PIP_HAS_SERIAL Preprocessor guards inverted: - #ifndef PIP_NO_X → #ifdef PIP_HAS_X - #ifdef PIP_NO_X → #ifndef PIP_HAS_X CMake options default ON instead of OFF. Platform blocks set flags OFF to disable features. 85 files transformed via Python script + 2 manual fixes.
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
#include "piliterals_time.h"
|
||||
#include "pipropertystorage.h"
|
||||
|
||||
#ifndef PIP_NO_FILESYSTEM
|
||||
#ifdef PIP_HAS_FILESYSTEM
|
||||
# include "pitime.h"
|
||||
# include "pitranslator.h"
|
||||
|
||||
@@ -60,11 +60,11 @@ static const uchar binlog_sig[] = {'B', 'I', 'N', 'L', 'O', 'G'};
|
||||
REGISTER_DEVICE(PIBinaryLog)
|
||||
|
||||
PIBinaryLog::PIBinaryLog() {
|
||||
# ifdef PIP_NO_THREADS
|
||||
# ifndef PIP_HAS_THREADS
|
||||
setThreadedReadBufferSize(512);
|
||||
# else
|
||||
setThreadedReadBufferSize(64_KiB);
|
||||
# endif // PIP_NO_THREADS
|
||||
# endif // PIP_HAS_THREADS
|
||||
is_started = is_indexed = is_pause = false;
|
||||
create_index_on_fly = false;
|
||||
current_index = -1;
|
||||
@@ -1011,4 +1011,4 @@ void PIBinaryLog::CompleteIndex::makeIndexPos() {
|
||||
index_pos[index[i].pos] = i;
|
||||
}
|
||||
|
||||
#endif // PIP_NO_FILESYSTEM
|
||||
#endif // PIP_HAS_FILESYSTEM
|
||||
|
||||
Reference in New Issue
Block a user