LSSTApplications  18.1.0
LSSTDataManagementBasePackage
Public Member Functions | List of all members
lsst::log::callable_wrapper Class Reference

Public Member Functions

 callable_wrapper (PyObject *callable)
 
void operator() ()
 

Detailed Description

Definition at line 39 of file log.cc.

Constructor & Destructor Documentation

◆ callable_wrapper()

lsst::log::callable_wrapper::callable_wrapper ( PyObject *  callable)
inline

Definition at line 41 of file log.cc.

41 : _callable(callable) { Py_XINCREF(_callable); }

Member Function Documentation

◆ operator()()

void lsst::log::callable_wrapper::operator() ( )
inline

Definition at line 42 of file log.cc.

42  {
43  // make sure we own GIL before doing Python call
44  auto state = PyGILState_Ensure();
45  PyObject_CallObject(_callable, nullptr);
46  PyGILState_Release(state);
47  }

The documentation for this class was generated from the following file: