Alexander Belopolsky wrote:
4. Should exported symbols be always declared in headers or is it ok to just declare them as extern in .c files where they are used?
Is the concern that moving them to a header makes them part of the API?
In other words, does replacing
PyObject *
PyFile_FromString(char *name, char *mode)
{
extern int fclose(FILE *);
...
}
with
#include
Jim Jewett schrieb:
Is the concern that moving them to a header makes them part of the API?
In other words, does replacing
PyObject * PyFile_FromString(char *name, char *mode) { extern int fclose(FILE *); ... }
with
#include
mean that the
needs to be included from then on, even if PyFile_FromString stops relying upon it?
stdio.h is included by the Python.h header file anyway. There is simply on point in declaring fclose() a second time here. Christian
participants (2)
-
Christian Heimes
-
Jim Jewett