Bug 1295762 - Part 1: Implement rust bindings to XPCOM's string types, r=froydnj
MozReview-Commit-ID: 7fnWSc3AzlR
This commit is contained in:
@@ -349,3 +349,38 @@ nsStringBuffer::SizeOfIncludingThisEvenIfShared(mozilla::MallocSizeOf aMallocSiz
|
||||
|
||||
static_assert(sizeof(nsStringContainer_base) == sizeof(nsSubstring),
|
||||
"internal and external strings must have the same size");
|
||||
|
||||
// Provide rust bindings to the nsA[C]String types
|
||||
extern "C" {
|
||||
|
||||
void Gecko_FinalizeCString(nsACString* aThis)
|
||||
{
|
||||
aThis->~nsACString();
|
||||
}
|
||||
|
||||
void Gecko_AssignCString(nsACString* aThis, const nsACString* aOther)
|
||||
{
|
||||
aThis->Assign(*aOther);
|
||||
}
|
||||
|
||||
void Gecko_AppendCString(nsACString* aThis, const nsACString* aOther)
|
||||
{
|
||||
aThis->Append(*aOther);
|
||||
}
|
||||
|
||||
void Gecko_FinalizeString(nsAString* aThis)
|
||||
{
|
||||
aThis->~nsAString();
|
||||
}
|
||||
|
||||
void Gecko_AssignString(nsAString* aThis, const nsAString* aOther)
|
||||
{
|
||||
aThis->Assign(*aOther);
|
||||
}
|
||||
|
||||
void Gecko_AppendString(nsAString* aThis, const nsAString* aOther)
|
||||
{
|
||||
aThis->Append(*aOther);
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
Reference in New Issue
Block a user