A named #import c unit declared inside an aliased module sits two namespace levels deep in the merged tree; the one-level walk (the extractLibraries/0130 pattern in c_import form) never collected it, so the unit silently never compiled and its symbols resolved from whatever process image carried the same names — surfaced by C4's sqlite migration, where only the version pin could tell the OS copy from the vendored one.
11 lines
269 B
Plaintext
11 lines
269 B
Plaintext
// A module that owns a named C unit + a hand-curated binding.
|
|
#import "modules/std.sx";
|
|
|
|
cunit :: #import c {
|
|
#source "inmod.c";
|
|
};
|
|
|
|
unit_in_mod_answer :: () -> i32 #foreign cunit "unit_in_mod_answer";
|
|
|
|
answer_via_mod :: () -> i32 { return unit_in_mod_answer(); }
|