2016-11-30 17:33:44 +01:00
|
|
|
#ifndef PYHELPER_H
|
|
|
|
#define PYHELPER_H
|
|
|
|
|
2017-04-08 01:05:04 +02:00
|
|
|
#define likely(x) __builtin_expect(!!(x), 1)
|
|
|
|
#define unlikely(x) __builtin_expect(!!(x), 0)
|
|
|
|
|
2017-02-06 19:31:34 +01:00
|
|
|
double get_monotonic(void);
|
2016-11-30 17:33:44 +01:00
|
|
|
struct timespec fill_time(double time);
|
2016-11-30 18:04:28 +01:00
|
|
|
void set_python_logging_callback(void (*func)(const char *));
|
|
|
|
void errorf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
2016-11-30 17:33:44 +01:00
|
|
|
void report_errno(char *where, int rc);
|
|
|
|
char *dump_string(char *outbuf, int outbuf_size, char *inbuf, int inbuf_size);
|
|
|
|
|
|
|
|
#endif // pyhelper.h
|