zpmod  b19981f
High-performance Zsh module for script optimization and filesystem helpers
source_study_stub.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
2 #include "zpmod.mdh"
3 #include "zpmod.pro"
4 /* Ensure this file compiles (guard against duplicate definition) */
5 #ifndef HAVE_ZPMOD_SOURCE_STUDY_CORE_STUB
6 #define HAVE_ZPMOD_SOURCE_STUDY_CORE_STUB 1
7 // NOLINTBEGIN(bugprone-easily-swappable-parameters)
8 int zp_source_study_core(const char *nam, int report_count, int threshold_ms,
9  int clear_history) {
10  (void)threshold_ms;
11  (void)clear_history;
12  (void)nam;
13  if (report_count < 0) {
14  return 1;
15  }
16  return 0; /* no-op */
17 }
18 /* Force a reference so the object file is not discarded even under LTO.
19  * We create a local static function pointer with 'used' attribute so that
20  * the symbol is considered referenced without triggering warnings. */
21 static int (*zp_source_study_core_anchor)(const char *, int, int, int)
22  __attribute__((used)) = zp_source_study_core;
23 #endif
24 // NOLINTEND(bugprone-easily-swappable-parameters)
int zp_source_study_core(const char *nam, int report_count, int threshold_ms, int clear_history)
Module declaration header (mdh) for zpmod.
Prototype stub for zpmod when building out-of-tree.