Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include/python2....
File: longobject.h
#ifndef Py_LONGOBJECT_H
[0] Fix | Delete
#define Py_LONGOBJECT_H
[1] Fix | Delete
#ifdef __cplusplus
[2] Fix | Delete
extern "C" {
[3] Fix | Delete
#endif
[4] Fix | Delete
[5] Fix | Delete
[6] Fix | Delete
/* Long (arbitrary precision) integer object interface */
[7] Fix | Delete
[8] Fix | Delete
typedef struct _longobject PyLongObject; /* Revealed in longintrepr.h */
[9] Fix | Delete
[10] Fix | Delete
PyAPI_DATA(PyTypeObject) PyLong_Type;
[11] Fix | Delete
[12] Fix | Delete
#define PyLong_Check(op) \
[13] Fix | Delete
PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LONG_SUBCLASS)
[14] Fix | Delete
#define PyLong_CheckExact(op) (Py_TYPE(op) == &PyLong_Type)
[15] Fix | Delete
[16] Fix | Delete
PyAPI_FUNC(PyObject *) PyLong_FromLong(long);
[17] Fix | Delete
PyAPI_FUNC(PyObject *) PyLong_FromUnsignedLong(unsigned long);
[18] Fix | Delete
PyAPI_FUNC(PyObject *) PyLong_FromDouble(double);
[19] Fix | Delete
PyAPI_FUNC(PyObject *) PyLong_FromSize_t(size_t);
[20] Fix | Delete
PyAPI_FUNC(PyObject *) PyLong_FromSsize_t(Py_ssize_t);
[21] Fix | Delete
PyAPI_FUNC(long) PyLong_AsLong(PyObject *);
[22] Fix | Delete
PyAPI_FUNC(long) PyLong_AsLongAndOverflow(PyObject *, int *);
[23] Fix | Delete
PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLong(PyObject *);
[24] Fix | Delete
PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLongMask(PyObject *);
[25] Fix | Delete
PyAPI_FUNC(Py_ssize_t) PyLong_AsSsize_t(PyObject *);
[26] Fix | Delete
PyAPI_FUNC(int) _PyLong_AsInt(PyObject *);
[27] Fix | Delete
PyAPI_FUNC(PyObject *) PyLong_GetInfo(void);
[28] Fix | Delete
[29] Fix | Delete
/* For use by intobject.c only */
[30] Fix | Delete
#define _PyLong_AsSsize_t PyLong_AsSsize_t
[31] Fix | Delete
#define _PyLong_FromSize_t PyLong_FromSize_t
[32] Fix | Delete
#define _PyLong_FromSsize_t PyLong_FromSsize_t
[33] Fix | Delete
PyAPI_DATA(int) _PyLong_DigitValue[256];
[34] Fix | Delete
[35] Fix | Delete
/* _PyLong_Frexp returns a double x and an exponent e such that the
[36] Fix | Delete
true value is approximately equal to x * 2**e. e is >= 0. x is
[37] Fix | Delete
0.0 if and only if the input is 0 (in which case, e and x are both
[38] Fix | Delete
zeroes); otherwise, 0.5 <= abs(x) < 1.0. On overflow, which is
[39] Fix | Delete
possible if the number of bits doesn't fit into a Py_ssize_t, sets
[40] Fix | Delete
OverflowError and returns -1.0 for x, 0 for e. */
[41] Fix | Delete
PyAPI_FUNC(double) _PyLong_Frexp(PyLongObject *a, Py_ssize_t *e);
[42] Fix | Delete
[43] Fix | Delete
PyAPI_FUNC(double) PyLong_AsDouble(PyObject *);
[44] Fix | Delete
PyAPI_FUNC(PyObject *) PyLong_FromVoidPtr(void *);
[45] Fix | Delete
PyAPI_FUNC(void *) PyLong_AsVoidPtr(PyObject *);
[46] Fix | Delete
[47] Fix | Delete
#ifdef HAVE_LONG_LONG
[48] Fix | Delete
PyAPI_FUNC(PyObject *) PyLong_FromLongLong(PY_LONG_LONG);
[49] Fix | Delete
PyAPI_FUNC(PyObject *) PyLong_FromUnsignedLongLong(unsigned PY_LONG_LONG);
[50] Fix | Delete
PyAPI_FUNC(PY_LONG_LONG) PyLong_AsLongLong(PyObject *);
[51] Fix | Delete
PyAPI_FUNC(unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLong(PyObject *);
[52] Fix | Delete
PyAPI_FUNC(unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLongMask(PyObject *);
[53] Fix | Delete
PyAPI_FUNC(PY_LONG_LONG) PyLong_AsLongLongAndOverflow(PyObject *, int *);
[54] Fix | Delete
#endif /* HAVE_LONG_LONG */
[55] Fix | Delete
[56] Fix | Delete
PyAPI_FUNC(PyObject *) PyLong_FromString(char *, char **, int);
[57] Fix | Delete
#ifdef Py_USING_UNICODE
[58] Fix | Delete
PyAPI_FUNC(PyObject *) PyLong_FromUnicode(Py_UNICODE*, Py_ssize_t, int);
[59] Fix | Delete
#endif
[60] Fix | Delete
[61] Fix | Delete
/* _PyLong_Sign. Return 0 if v is 0, -1 if v < 0, +1 if v > 0.
[62] Fix | Delete
v must not be NULL, and must be a normalized long.
[63] Fix | Delete
There are no error cases.
[64] Fix | Delete
*/
[65] Fix | Delete
PyAPI_FUNC(int) _PyLong_Sign(PyObject *v);
[66] Fix | Delete
[67] Fix | Delete
[68] Fix | Delete
/* _PyLong_NumBits. Return the number of bits needed to represent the
[69] Fix | Delete
absolute value of a long. For example, this returns 1 for 1 and -1, 2
[70] Fix | Delete
for 2 and -2, and 2 for 3 and -3. It returns 0 for 0.
[71] Fix | Delete
v must not be NULL, and must be a normalized long.
[72] Fix | Delete
(size_t)-1 is returned and OverflowError set if the true result doesn't
[73] Fix | Delete
fit in a size_t.
[74] Fix | Delete
*/
[75] Fix | Delete
PyAPI_FUNC(size_t) _PyLong_NumBits(PyObject *v);
[76] Fix | Delete
[77] Fix | Delete
/* _PyLong_FromByteArray: View the n unsigned bytes as a binary integer in
[78] Fix | Delete
base 256, and return a Python long with the same numeric value.
[79] Fix | Delete
If n is 0, the integer is 0. Else:
[80] Fix | Delete
If little_endian is 1/true, bytes[n-1] is the MSB and bytes[0] the LSB;
[81] Fix | Delete
else (little_endian is 0/false) bytes[0] is the MSB and bytes[n-1] the
[82] Fix | Delete
LSB.
[83] Fix | Delete
If is_signed is 0/false, view the bytes as a non-negative integer.
[84] Fix | Delete
If is_signed is 1/true, view the bytes as a 2's-complement integer,
[85] Fix | Delete
non-negative if bit 0x80 of the MSB is clear, negative if set.
[86] Fix | Delete
Error returns:
[87] Fix | Delete
+ Return NULL with the appropriate exception set if there's not
[88] Fix | Delete
enough memory to create the Python long.
[89] Fix | Delete
*/
[90] Fix | Delete
PyAPI_FUNC(PyObject *) _PyLong_FromByteArray(
[91] Fix | Delete
const unsigned char* bytes, size_t n,
[92] Fix | Delete
int little_endian, int is_signed);
[93] Fix | Delete
[94] Fix | Delete
/* _PyLong_AsByteArray: Convert the least-significant 8*n bits of long
[95] Fix | Delete
v to a base-256 integer, stored in array bytes. Normally return 0,
[96] Fix | Delete
return -1 on error.
[97] Fix | Delete
If little_endian is 1/true, store the MSB at bytes[n-1] and the LSB at
[98] Fix | Delete
bytes[0]; else (little_endian is 0/false) store the MSB at bytes[0] and
[99] Fix | Delete
the LSB at bytes[n-1].
[100] Fix | Delete
If is_signed is 0/false, it's an error if v < 0; else (v >= 0) n bytes
[101] Fix | Delete
are filled and there's nothing special about bit 0x80 of the MSB.
[102] Fix | Delete
If is_signed is 1/true, bytes is filled with the 2's-complement
[103] Fix | Delete
representation of v's value. Bit 0x80 of the MSB is the sign bit.
[104] Fix | Delete
Error returns (-1):
[105] Fix | Delete
+ is_signed is 0 and v < 0. TypeError is set in this case, and bytes
[106] Fix | Delete
isn't altered.
[107] Fix | Delete
+ n isn't big enough to hold the full mathematical value of v. For
[108] Fix | Delete
example, if is_signed is 0 and there are more digits in the v than
[109] Fix | Delete
fit in n; or if is_signed is 1, v < 0, and n is just 1 bit shy of
[110] Fix | Delete
being large enough to hold a sign bit. OverflowError is set in this
[111] Fix | Delete
case, but bytes holds the least-significant n bytes of the true value.
[112] Fix | Delete
*/
[113] Fix | Delete
PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
[114] Fix | Delete
unsigned char* bytes, size_t n,
[115] Fix | Delete
int little_endian, int is_signed);
[116] Fix | Delete
[117] Fix | Delete
/* _PyLong_Format: Convert the long to a string object with given base,
[118] Fix | Delete
appending a base prefix of 0[box] if base is 2, 8 or 16.
[119] Fix | Delete
Add a trailing "L" if addL is non-zero.
[120] Fix | Delete
If newstyle is zero, then use the pre-2.6 behavior of octal having
[121] Fix | Delete
a leading "0", instead of the prefix "0o" */
[122] Fix | Delete
PyAPI_FUNC(PyObject *) _PyLong_Format(PyObject *aa, int base, int addL, int newstyle);
[123] Fix | Delete
[124] Fix | Delete
/* Format the object based on the format_spec, as defined in PEP 3101
[125] Fix | Delete
(Advanced String Formatting). */
[126] Fix | Delete
PyAPI_FUNC(PyObject *) _PyLong_FormatAdvanced(PyObject *obj,
[127] Fix | Delete
char *format_spec,
[128] Fix | Delete
Py_ssize_t format_spec_len);
[129] Fix | Delete
[130] Fix | Delete
#ifdef __cplusplus
[131] Fix | Delete
}
[132] Fix | Delete
#endif
[133] Fix | Delete
#endif /* !Py_LONGOBJECT_H */
[134] Fix | Delete
[135] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function