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 <pierre-emmanuel.patry@embecosm.com>
This commit is contained in:
parent
f4b2b28f32
commit
6a569f5c6c
2 changed files with 9 additions and 0 deletions
|
@ -23,7 +23,10 @@
|
|||
|
||||
#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
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Add table
Reference in a new issue