Debian Codegraph @

rpython/rlib/rvmprof/src/shared/compat.h

raw symbols SCIP
1 #pragma once
2
3 #include "vmprof.h"
4
5 #ifndef RPYTHON_VMPROF
6 # if PY_MAJOR_VERSION >= 3
7 #define PyStr_AS_STRING PyBytes_AS_STRING
8 #define PyStr_GET_SIZE PyBytes_GET_SIZE
9 #define PyStr_NEW PyUnicode_FromString
10 #define PyStr_n_NEW PyUnicode_FromStringAndSize
11 #define PyLong_NEW PyLong_FromSsize_t
12 # else
13 #define PyStr_AS_STRING PyString_AS_STRING
14 #define PyStr_GET_SIZE PyString_GET_SIZE
15 #define PyStr_NEW PyString_FromString
16 #define PyStr_n_NEW PyString_FromStringAndSize
17 #define PyLong_NEW PyInt_FromSsize_t
18 #define PyLong_AsLong PyInt_AsLong
19 # endif
20 #endif
21
22 int vmp_write_all(const char *buf, size_t bufsize);
23 int vmp_write_time_now(int marker);
24 int vmp_write_meta(const char * key, const char * value);
25
26 int vmp_profile_fileno(void);
27 void vmp_set_profile_fileno(int fileno);