| 1 | /* This file is installed for backward compatibility. */ |
| 2 | #include "gc/gc.h" |
| 3 | |
| 4 | /* Fix for vlang/v#27179: the original version of this file cast the |
| 5 | * pointer argument to V's `u64` type, which makes the header illegal |
| 6 | * to include from standalone C (any C shim doing `#include <gc.h>` |
| 7 | * via V's -I@VEXEROOT/thirdparty/libgc/include path would fail with |
| 8 | * "unknown type: u64"). `GC_word` is the libgc-defined type that |
| 9 | * `GC_noop1` actually takes (gc/gc.h, typedef'd to uintptr_t on most |
| 10 | * platforms) — using it makes this header valid both from V code and |
| 11 | * from plain C shims. */ |
| 12 | #ifndef _MSC_VER |
| 13 | __attribute__ ((weak)) GC_API void GC_CALL GC_noop1_ptr(volatile void *p) { |
| 14 | GC_noop1((GC_word)p); |
| 15 | } |
| 16 | #endif |
| 17 | |