Guidelines for C-level function references #743
Unanswered
Jay-Damodaran
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
Do I understand correctly that the only issue here is that those functions are declared as static, so you can't call them from outside? Would it help you, if the function declaration was global? I think I wouldn't do that by default, but we could have a preprocessor directive that you could switch on, and that would then change the declaration of the function. This would leave everyone else alone, but if you know what you're doing, you could call the function from outside without having to copy anything. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm writing a set of C functions that extends ulab functionality and references other ulab functions. One example in my case is that I would like to use compare_maximum and compare_where which are defined in numpy/compare.c. The problem is these are static functions that aren't declared in the header numpy/compare.h, so when I include this into my c file, I am getting an implicit function declaration error.
What is the recommended approach to utilizing other ulab functions at the c level? Should I just copy that code into my script, in which case there would be duplicated code that takes up more space, or should I modify the original ulab code to make those functions non-static and add them to the header file?
Beta Was this translation helpful? Give feedback.
All reactions