Skip to content

[NB_MODULE]Bindind same module in different source file. #285

Answered by zhqrbitee
huangweiwu asked this question in Q&A
Discussion options

You must be logged in to vote

Not sure I understand you problem.
But basically you can do something e.g. below:

void init_a(nb::module_ &m);

NB_MODULE(my_module, m)
{
    init_a(m);
}
void init_a(nb::module_ &m) {
   // some implementation.
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wjakob
Comment options

Answer selected by wjakob
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants