Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
CallContext.cxx
Go to the documentation of this file.
1// Bindings
2#include "CPyCppyy.h"
3#include "CallContext.h"
4
5//-----------------------------------------------------------------------------
7{
8 static uint32_t flags = 0;
9 return flags;
10}
11
12//-----------------------------------------------------------------------------
14 if (pyobj) {
15 if (!fTemps)
16 fTemps = new Temporary{pyobj, nullptr};
17 else {
18 Temporary* tmp = fTemps;
19 while (tmp->fNext) tmp = tmp->fNext;
20 tmp->fNext = new Temporary{pyobj, nullptr};
21 }
22 }
23}
24
25//-----------------------------------------------------------------------------
27 Temporary* tmp = fTemps;
28 while (tmp) {
29 Py_DECREF(tmp->fPyObject);
30 Temporary* tmp2 = tmp->fNext;
31 delete tmp;
32 tmp = tmp2;
33 }
34 fTemps = nullptr;
35}
36
37//-----------------------------------------------------------------------------
39{
40 auto &flags = GlobalPolicyFlags();
41 bool old = flags & toggleFlag;
42 if (enabled)
43 flags |= toggleFlag;
44 else
45 flags &= ~toggleFlag;
46 return old;
47}
_object PyObject
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
static bool SetGlobalPolicy(ECallFlags e, bool enabled)
static uint32_t & GlobalPolicyFlags()
void AddTemporary(PyObject *pyobj)