From: Pierre-Emmanuel Patry Date: Wed, 12 Apr 2023 10:11:37 +0000 (+0200) Subject: gccrs: libproc_macro: Add namespace to Ident X-Git-Tag: basepoints/gcc-15~2637 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a569f5c6c0e5da5ff68d94b132d4305bc999bd5;p=thirdparty%2Fgcc.git gccrs: libproc_macro: Add namespace to Ident Add a new Ident namespace to group Ident related enumeration and structures. libgrust/ChangeLog: * libproc_macro/ident.cc (Ident::make_ident): Add Ident namespace. * libproc_macro/ident.h (Ident__clone): Likewise. Signed-off-by: Pierre-Emmanuel Patry --- diff --git a/libgrust/libproc_macro/ident.cc b/libgrust/libproc_macro/ident.cc index 6ad9e7807f10..d7d588975d75 100644 --- a/libgrust/libproc_macro/ident.cc +++ b/libgrust/libproc_macro/ident.cc @@ -23,7 +23,10 @@ #include +namespace Ident { + extern "C" { + Ident Ident__new (unsigned char *str, std::uint64_t len) { @@ -72,3 +75,5 @@ Ident::make_ident (const unsigned char *str, std::uint64_t len, bool raw) std::memcpy (val, str, len); return {raw, val, len}; } + +} // namespace Ident diff --git a/libgrust/libproc_macro/ident.h b/libgrust/libproc_macro/ident.h index 8ab7e6dc3242..5a2a46a8c1f7 100644 --- a/libgrust/libproc_macro/ident.h +++ b/libgrust/libproc_macro/ident.h @@ -26,6 +26,8 @@ #include #include +namespace Ident { + struct Ident { bool is_raw; @@ -56,4 +58,6 @@ Ident Ident__clone (const Ident *ident); } +} // namespace Ident + #endif /* ! IDENT_H */