Allow setting the protected namespace of a builtin class.

This commit is contained in:
David Wendt 2020-07-20 19:11:08 -04:00
parent 9dc6cbe1ce
commit d366ceab0e
1 changed files with 5 additions and 0 deletions

View File

@ -148,6 +148,11 @@ impl<'gc> Class<'gc> {
self.attributes = CollectWrapper(attributes);
}
/// Add a protected namespace to this class.
pub fn set_protected_namespace(&mut self, ns: Namespace<'gc>) {
self.protected_namespace = Some(ns)
}
/// Construct a class from a `TranslationUnit` and it's class index.
///
/// The returned class will be allocated, but no traits will be loaded. The