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:
2026-08-11 19:51:42 +03:00
parent 1db0dfea43
commit 077ac9887b
85 changed files with 344 additions and 342 deletions
+6 -6
View File
@@ -17,7 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PIP_NO_THREADS
#ifdef PIP_HAS_THREADS
# include "pithread.h"
# include "piincludes_p.h"
@@ -450,7 +450,7 @@ __THREAD_FUNC_RET__ thread_function_once(void * t) {
//! \return \c false если таймаут истёк
# ifndef PIP_NO_THREADS
# ifdef PIP_HAS_THREADS
__PIThreadCollection * __PIThreadCollection::instance() {
return __PIThreadCollection_Initializer__::__instance__;
@@ -516,7 +516,7 @@ __PIThreadCollection_Initializer__::~__PIThreadCollection_Initializer__() {
}
}
# endif // PIP_NO_THREADS
# endif // PIP_HAS_THREADS
PRIVATE_DEFINITION_START(PIThread)
@@ -1003,7 +1003,7 @@ void PIThread::runOnce(PIObject * object, const char * handler, const PIString &
delete t;
return;
}
# ifndef PIP_NO_THREADS
# ifdef PIP_HAS_THREADS
__PIThreadCollection::instance()->startedAuto(t);
CONNECT0(void, t, stopped, __PIThreadCollection::instance(), stoppedAuto);
# endif
@@ -1037,7 +1037,7 @@ void PIThread::runOnce(std::function<void()> func, const PIString & name) {
PIThread * t = new PIThread();
t->setName(name);
t->setSlot(std::move(func));
# ifndef PIP_NO_THREADS
# ifdef PIP_HAS_THREADS
__PIThreadCollection::instance()->startedAuto(t);
CONNECT0(void, t, stopped, __PIThreadCollection::instance(), stoppedAuto);
# endif
@@ -1079,4 +1079,4 @@ bool PIThread::_waitForFinish(PISystemTime max_tm) {
# endif
return false;
}
#endif // PIP_NO_THREADS
#endif // PIP_HAS_THREADS