Wraping global variables

Asked by Sebastian Luther

I'm wrapping an API which uses global variables like this:

namespace N
{
   extern X* x;
   extern Y y;
   extern const Z z;
}

Is there a way to access these, especially without copying them?

Currently I'm writing access functions returning pointers to these variables. But I'd need a lot of these functions to cover the whole API.

Question information

Language:
English Edit question
Status:
Solved
For:
PyBindGen Edit question
Assignee:
No assignee Edit question
Solved by:
Gustavo Carneiro
Solved:
Last query:
Last reply:
Revision history for this message
Best Gustavo Carneiro (gjc) said :
#1

Alas, no, pybindgen does not have API to wrap global variables, sorry.
It doesn't sound very difficult to implement, but I don't have a lot of time lately.

Revision history for this message
Sebastian Luther (sebastianluther) said :
#2

Thanks Gustavo Carneiro, that solved my question.