Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TCallContext.cxx
Go to the documentation of this file.
1 // Bindings
2 #include "PyROOT.h"
3 #include "TCallContext.h"
4 
5 
6 //- data _____________________________________________________________________
7 namespace PyROOT {
8 
9  TCallContext::ECallFlags TCallContext::sMemoryPolicy = TCallContext::kUseHeuristics;
10 // this is just a data holder for linking; actual value is set in RootModule.cxx
11  TCallContext::ECallFlags TCallContext::sSignalPolicy = TCallContext::kSafe;
12 
13 } // namespace PyROOT
14 
15 
16 ////////////////////////////////////////////////////////////////////////////////
17 /// Set the global memory policy, which affects object ownership when objects
18 /// are passed as function arguments.
19 
20 Bool_t PyROOT::TCallContext::SetMemoryPolicy( ECallFlags e )
21 {
22  if ( kUseHeuristics == e || e == kUseStrict ) {
23  sMemoryPolicy = e;
24  return kTRUE;
25  }
26  return kFALSE;
27 }
28 
29 ////////////////////////////////////////////////////////////////////////////////
30 /// Set the global signal policy, which determines whether a jmp address
31 /// should be saved to return to after a C++ segfault.
32 
33 Bool_t PyROOT::TCallContext::SetSignalPolicy( ECallFlags e )
34 {
35  if ( kFast == e || e == kSafe ) {
36  sSignalPolicy = e;
37  return kTRUE;
38  }
39  return kFALSE;
40 }
41