MCPcopy Create free account
hub / github.com/pybind/pybind11 / get_code

Method get_code

tests/test_potentially_slicing_weak_ptr.cpp:102–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100 void set_wp(const std::weak_ptr<VB> &wp_) { wp = wp_; }
101
102 int get_code() const {
103 auto sp = wp.lock();
104 if (!sp) {
105 return -999;
106 }
107 return sp->get_code();
108 }
109
110 const char *get_trampoline_state() const { return determine_trampoline_state(wp.lock()); }
111

Callers

nothing calls this directly

Calls 2

lockMethod · 0.80
get_codeMethod · 0.45

Tested by

no test coverage detected