MCPcopy Create free account
hub / github.com/GNOME/gjs / get_prototype

Method get_prototype

gi/wrapperutils.h:238–241  ·  view source on GitHub ↗

* GIWrapperBase::get_prototype: * * get_prototype() doesn't assert. If you call it on a Prototype, it returns * you the same object cast to the correct type; if you call it on an * Instance, it returns you the Prototype belonging to the corresponding JS * prototype. */

Source from the content-addressed store, hash-verified

236 * prototype.
237 */
238 [[nodiscard]] [[gnu::const]]
239 Prototype* get_prototype() {
240 return is_prototype() ? to_prototype() : m_proto;
241 }
242 [[nodiscard]]
243 const Prototype* get_prototype() const {
244 return is_prototype() ? to_prototype() : m_proto;

Callers 1

constructorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected