example_0030.cpp
См. документацию.
1 #include <iostream>
2 #include <pyhrol.h>
3 
4 using namespace std;
5 using namespace pyhrol;
6 
7 void retval_function(Tuples &_args)
8 {
9  int i;
10  const char *pch;
11 
13  PYHROL_BUILD_VALUE_2(NULL, _args, i, pch)
15 
16  i = 1;
17  pch = "One";
18 
19  cout
20  << __func__ << ": I am called" << endl
21  << " My return values: i = " << i << ", pch = \"" << pch << "\"" << endl
22  ;
23 
25 }
26 
27 static void __on_load() __attribute__ ((constructor));
28 
29 void __on_load()
30 {
31  PYHROL_REGISTER_FUNCTION_NO_ARGS(retval_function, "Function with return value")
32 }
#define PYHROL_AFTER_BUILD_VALUE(container)
Definition: pyhrol_macro.h:18
void retval_function(Tuples &_args)
Definition: example_0030.cpp:7
#define PYHROL_AFTER_EXECUTE_DEFAULT(container)
Definition: pyhrol_macro.h:26
#define PYHROL_REGISTER_FUNCTION_NO_ARGS(function, help)
Definition: pyhrol_macro.h:40
static void __on_load() __attribute__((constructor))
#define PYHROL_AFTER_PARSE_TUPLE(container)
Definition: pyhrol_macro.h:9
#define PYHROL_BUILD_VALUE_2(description, container, arg1, arg2)