move pygetopt.h to internal (closes bpo-32264) (#4830)

This commit is contained in:
Benjamin Peterson 2017-12-14 23:48:12 -08:00 committed by GitHub
parent f74ef458ab
commit e425bd7517
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 25 additions and 34 deletions

View File

@ -0,0 +1,19 @@
#ifndef Py_INTERNAL_PYGETOPT_H
#define Py_INTERNAL_PYGETOPT_H
int _PyOS_opterr;
int _PyOS_optind;
wchar_t *_PyOS_optarg;
void _PyOS_ResetGetOpt(void);
typedef struct {
const wchar_t *name;
int has_arg;
int val;
} _PyOS_LongOption;
int _PyOS_GetOpt(int argc, wchar_t **argv, wchar_t *optstring,
const _PyOS_LongOption *longopts, int *longindex);
#endif /* !Py_INTERNAL_PYGETOPT_H */

View File

@ -1,28 +0,0 @@
#ifndef Py_PYGETOPT_H
#define Py_PYGETOPT_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef Py_LIMITED_API
PyAPI_DATA(int) _PyOS_opterr;
PyAPI_DATA(int) _PyOS_optind;
PyAPI_DATA(wchar_t *) _PyOS_optarg;
PyAPI_FUNC(void) _PyOS_ResetGetOpt(void);
typedef struct {
const wchar_t *name;
int has_arg;
int val;
} _PyOS_LongOption;
PyAPI_FUNC(int) _PyOS_GetOpt(int argc, wchar_t **argv, wchar_t *optstring,
const _PyOS_LongOption *longopts, int *longindex);
#endif /* !Py_LIMITED_API */
#ifdef __cplusplus
}
#endif
#endif /* !Py_PYGETOPT_H */

View File

@ -987,7 +987,6 @@ PYTHON_HEADERS= \
$(srcdir)/Include/pyhash.h \ $(srcdir)/Include/pyhash.h \
$(srcdir)/Include/pylifecycle.h \ $(srcdir)/Include/pylifecycle.h \
$(srcdir)/Include/pymath.h \ $(srcdir)/Include/pymath.h \
$(srcdir)/Include/pygetopt.h \
$(srcdir)/Include/pymacro.h \ $(srcdir)/Include/pymacro.h \
$(srcdir)/Include/pymem.h \ $(srcdir)/Include/pymem.h \
$(srcdir)/Include/pyport.h \ $(srcdir)/Include/pyport.h \
@ -1017,6 +1016,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/internal/ceval.h \ $(srcdir)/Include/internal/ceval.h \
$(srcdir)/Include/internal/gil.h \ $(srcdir)/Include/internal/gil.h \
$(srcdir)/Include/internal/mem.h \ $(srcdir)/Include/internal/mem.h \
$(srcdir)/Include/internal/pygetopt.h \
$(srcdir)/Include/internal/pystate.h \ $(srcdir)/Include/internal/pystate.h \
$(srcdir)/Include/internal/warnings.h \ $(srcdir)/Include/internal/warnings.h \
$(DTRACE_HEADERS) $(DTRACE_HEADERS)

View File

@ -0,0 +1 @@
Moved the pygetopt.h header into internal/, since it has no public APIs.

View File

@ -3,6 +3,7 @@
#include "Python.h" #include "Python.h"
#include "osdefs.h" #include "osdefs.h"
#include "internal/import.h" #include "internal/import.h"
#include "internal/pygetopt.h"
#include "internal/pystate.h" #include "internal/pystate.h"
#include <locale.h> #include <locale.h>
@ -27,8 +28,6 @@
#define PYTHONHOMEHELP "<prefix>/lib/pythonX.X" #define PYTHONHOMEHELP "<prefix>/lib/pythonX.X"
#endif #endif
#include "pygetopt.h"
#define COPYRIGHT \ #define COPYRIGHT \
"Type \"help\", \"copyright\", \"credits\" or \"license\" " \ "Type \"help\", \"copyright\", \"credits\" or \"license\" " \
"for more information." "for more information."

View File

@ -150,7 +150,7 @@
<ClInclude Include="..\Include\pyerrors.h" /> <ClInclude Include="..\Include\pyerrors.h" />
<ClInclude Include="..\Include\pyexpat.h" /> <ClInclude Include="..\Include\pyexpat.h" />
<ClInclude Include="..\Include\pyfpe.h" /> <ClInclude Include="..\Include\pyfpe.h" />
<ClInclude Include="..\Include\pygetopt.h" /> <ClInclude Include="..\Include\internal\pygetopt.h" />
<ClInclude Include="..\Include\pylifecycle.h" /> <ClInclude Include="..\Include\pylifecycle.h" />
<ClInclude Include="..\Include\pymath.h" /> <ClInclude Include="..\Include\pymath.h" />
<ClInclude Include="..\Include\pytime.h" /> <ClInclude Include="..\Include\pytime.h" />

View File

@ -234,7 +234,7 @@
<ClInclude Include="..\Include\pyfpe.h"> <ClInclude Include="..\Include\pyfpe.h">
<Filter>Include</Filter> <Filter>Include</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\Include\pygetopt.h"> <ClInclude Include="..\Include\internal\pygetopt.h">
<Filter>Include</Filter> <Filter>Include</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\Include\pylifecycle.h"> <ClInclude Include="..\Include\pylifecycle.h">

View File

@ -31,7 +31,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <wchar.h> #include <wchar.h>
#include <pygetopt.h> #include "internal/pygetopt.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {