]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: libproc_macro: Add namespace to Ident
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 12 Apr 2023 10:11:37 +0000 (12:11 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:34:11 +0000 (18:34 +0100)
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 <pierre-emmanuel.patry@embecosm.com>
libgrust/libproc_macro/ident.cc
libgrust/libproc_macro/ident.h

index 6ad9e7807f10abc7fa515e7e24000dbfb216d974..d7d588975d753295b0cb3c91f4b4cd0720a3ed5e 100644 (file)
 
 #include <cstring>
 
+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
index 8ab7e6dc3242b2c7380a8b462e27fa538e3c5526..5a2a46a8c1f77f2a533fe0b9705b670a85cb7bba 100644 (file)
@@ -26,6 +26,8 @@
 #include <cstdint>
 #include <string>
 
+namespace Ident {
+
 struct Ident
 {
   bool is_raw;
@@ -56,4 +58,6 @@ Ident
 Ident__clone (const Ident *ident);
 }
 
+} // namespace Ident
+
 #endif /* ! IDENT_H */