ROOT
master
Reference Guide
Loading...
Searching...
No Matches
PyzPythonHelpers.cxx
Go to the documentation of this file.
1
// Author: Stefan Wunsch CERN 08/2018
2
// Original PyROOT code by Wim Lavrijsen, LBL
3
4
/*************************************************************************
5
* Copyright (C) 1995-2018, Rene Brun and Fons Rademakers. *
6
* All rights reserved. *
7
* *
8
* For the licensing terms see $ROOTSYS/LICENSE. *
9
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10
*************************************************************************/
11
12
/**
13
14
Set of helper functions that are invoked from the pythonizors, on the
15
Python side. For that purpose, they are included in the interface of the
16
PyROOT extension module.
17
18
*/
19
20
#include "
CPyCppyy/API.h
"
21
22
#include "
PyROOTPythonize.h
"
23
24
#include "
ROOT/RConfig.hxx
"
25
#include "
TInterpreter.h
"
26
27
#include <sstream>
28
29
////////////////////////////////////////////////////////////////////////////
30
/// \brief Get endianess of the system
31
/// \param[in] self Always null, since this is a module function.
32
/// \param[in] args Pointer to an empty Python tuple.
33
/// \return Endianess as Python string
34
///
35
/// This function returns endianess of the system as a Python integer. The
36
/// return value is either '<' or '>' for little or big endian, respectively.
37
PyObject
*
PyROOT::GetEndianess
(
PyObject
*
/* self */
,
PyObject
*
/* args */
)
38
{
39
#ifdef R__BYTESWAP
40
return
PyUnicode_FromString(
"<"
);
41
#else
42
return
PyUnicode_FromString(
">"
);
43
#endif
44
}
API.h
PyObject
_object PyObject
Definition
PyMethodBase.h:43
PyROOTPythonize.h
RConfig.hxx
TInterpreter.h
PyROOT::GetEndianess
PyObject * GetEndianess(PyObject *self, PyObject *args)
Set of helper functions that are invoked from the pythonizors, on the Python side.
Definition
PyzPythonHelpers.cxx:37
bindings
pyroot
pythonizations
src
PyzPythonHelpers.cxx
ROOT master - Reference Guide Generated on Tue Mar 19 2024 18:27:03 (GVA Time) using Doxygen 1.9.8