example_0020.cpp
См. документацию.
1 #include <iostream>
2 #include <pyhrol.h>
3 
4 using namespace std;
5 using namespace pyhrol;
6 
8 {
9  int i;
10  const char *pch;
11 
12  PYHROL_PARSE_TUPLE_2(NULL, _args, i, pch)
15 
16  cout
17  << __func__ << ": I am called" << endl
18  << " My args: i = " << i << ", pch = \"" << pch << "\"" << endl
19  ;
20 
22 }
23 
24 static void __on_load() __attribute__ ((constructor));
25 
26 void __on_load()
27 {
28  PYHROL_REGISTER_FUNCTION(function_with_args, "Function takes primitive args but returns no values")
29 }
#define PYHROL_AFTER_BUILD_VALUE(container)
Definition: pyhrol_macro.h:18
#define PYHROL_AFTER_EXECUTE_DEFAULT(container)
Definition: pyhrol_macro.h:26
#define PYHROL_AFTER_PARSE_TUPLE(container)
Definition: pyhrol_macro.h:9
#define PYHROL_PARSE_TUPLE_2(description, container, arg1, arg2)
static void __on_load() __attribute__((constructor))
void function_with_args(Tuples &_args)
Definition: example_0020.cpp:7
#define PYHROL_REGISTER_FUNCTION(function, help)
Definition: pyhrol_macro.h:34