Mercurial > cpython-lru_cache-weakref
comparison Python/sysmodule.c @ 13694:b54f11ada91e legacy-trunk
Create a new section of pyport.h to hold all external function declarations
for systems that are missing those declarations from system include files.
Start by moving a pointy-haired ones from their previous locations to the
new section.
(The gethostname() one, for instance, breaks on several systems, because
some define it as (char *, size_t) and some as (char *, int).)
I purposely decided not to include the summary of used #defines like Tim did
in the first section of pyport.h. In my opinion, the number of #defines
likedly to be used by this section would make such an overview unwieldy. I
would suggest documenting the non-obvious ones, though.
| author | Thomas Wouters <thomas@python.org> |
|---|---|
| date | Mon, 24 Jul 2000 16:06:23 +0000 |
| parents | f79434ee41fa |
| children | 841cf9012ac3 |
comparison
equal
deleted
inserted
replaced
| 13693:25fc68077b66 | 13694:b54f11ada91e |
|---|---|
| 383 #endif | 383 #endif |
| 384 | 384 |
| 385 PyObject * | 385 PyObject * |
| 386 _PySys_Init(void) | 386 _PySys_Init(void) |
| 387 { | 387 { |
| 388 extern int fclose(FILE *); | |
| 389 PyObject *m, *v, *sysdict; | 388 PyObject *m, *v, *sysdict; |
| 390 PyObject *sysin, *sysout, *syserr; | 389 PyObject *sysin, *sysout, *syserr; |
| 391 char *s; | 390 char *s; |
| 392 | 391 |
| 393 m = Py_InitModule3("sys", sys_methods, sys_doc); | 392 m = Py_InitModule3("sys", sys_methods, sys_doc); |
