Sparse Virtual File System  0.4.1
A Sparse Virtual File System.
svfs_util.h
Go to the documentation of this file.
1 
32 #ifndef CPPSVF_UTIL_H
33 #define CPPSVF_UTIL_H
34 
35 #include <exception>
36 #include <string>
37 
38 #include "cp_svfs.h"
39 
43 #define IMPORT_DATETIME_IF_UNINITIALISED do { \
44  if (! PyDateTimeAPI) { \
45  PyDateTime_IMPORT; \
46  } \
47  assert(PyDateTimeAPI); \
48 } while(0)
49 
51 #define TRACE_SELF_ARGS_KWARGS do { \
52  fprintf(stdout, "self, args, kwargs:\n"); \
53  fprintf(stdout, " self: "); \
54  PyObject_Print((PyObject *)self, stdout, Py_PRINT_RAW); \
55  fprintf(stdout, "\n"); \
56  fprintf(stdout, " args: "); \
57  PyObject_Print(args, stdout, Py_PRINT_RAW); \
58  fprintf(stdout, "\n"); \
59  fprintf(stdout, "kwargs: "); \
60  PyObject_Print(kwargs, stdout, Py_PRINT_RAW); \
61  fprintf(stdout, "\n"); \
62 } while(0)
63 
64 PyObject *
65 datetime_from_struct_tm(const std::tm *bdt, int usecond);
66 
67 #endif //CPPSVF_UTIL_H
PyObject * datetime_from_struct_tm(const std::tm *bdt, int usecond)
Definition: svfs_util.cpp:63