Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions crates/cpp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use symbol_name::{make_external_component, make_external_symbol};
use wit_bindgen_c::to_c_ident;
use wit_bindgen_core::{
abi::{self, AbiVariant, Bindgen, Bitcast, LiftLower, WasmSignature, WasmType},
uwrite, uwriteln,
name_package_module, uwrite, uwriteln,
wit_parser::{
Alignment, ArchitectureSize, Docs, Function, FunctionKind, Handle, Int, InterfaceId,
Resolve, SizeAlign, Stability, Type, TypeDef, TypeDefKind, TypeId, TypeOwner, WorldId,
Expand Down Expand Up @@ -741,9 +741,11 @@ fn namespace(resolve: &Resolve, owner: &TypeOwner, guest_export: bool, opts: &Op
TypeOwner::World(w) => result.push(to_c_ident(&resolve.worlds[*w].name)),
TypeOwner::Interface(i) => {
let iface = &resolve.interfaces[*i];
let pkg = &resolve.packages[iface.package.unwrap()];
let pkg_id = iface.package.unwrap();
let pkg = &resolve.packages[pkg_id];
result.push(to_c_ident(&pkg.name.namespace));
result.push(to_c_ident(&pkg.name.name));
// Use name_package_module to get version-specific package names
result.push(to_c_ident(&name_package_module(resolve, pkg_id)));
if let Some(name) = &iface.name {
result.push(to_c_ident(name));
}
Expand Down
1 change: 0 additions & 1 deletion crates/test/src/cpp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ impl LanguageMethods for Cpp {
"async-trait-function.wit"
| "error-context.wit"
| "futures.wit"
| "multiversion"
| "resources-with-futures.wit"
| "resources-with-streams.wit"
| "streams.wit" => true,
Expand Down
Loading