Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Include/internal/pygetopt.h
Original file line number Diff line number Diff line change
@@ -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 */
28 changes: 0 additions & 28 deletions Include/pygetopt.h

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,6 @@ PYTHON_HEADERS= \
$(srcdir)/Include/pyhash.h \
$(srcdir)/Include/pylifecycle.h \
$(srcdir)/Include/pymath.h \
$(srcdir)/Include/pygetopt.h \
$(srcdir)/Include/pymacro.h \
$(srcdir)/Include/pymem.h \
$(srcdir)/Include/pyport.h \
Expand Down Expand Up @@ -1016,6 +1015,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/internal/ceval.h \
$(srcdir)/Include/internal/gil.h \
$(srcdir)/Include/internal/mem.h \
$(srcdir)/Include/internal/pygetopt.h \
$(srcdir)/Include/internal/pystate.h \
$(srcdir)/Include/internal/warnings.h \
$(DTRACE_HEADERS)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Moved the pygetopt.h header into internal/, since it has no public APIs.
3 changes: 1 addition & 2 deletions Modules/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "Python.h"
#include "osdefs.h"
#include "internal/import.h"
#include "internal/pygetopt.h"
#include "internal/pystate.h"

#include <locale.h>
Expand All @@ -27,8 +28,6 @@
#define PYTHONHOMEHELP "<prefix>/lib/pythonX.X"
#endif

#include "pygetopt.h"

#define COPYRIGHT \
"Type \"help\", \"copyright\", \"credits\" or \"license\" " \
"for more information."
Expand Down
2 changes: 1 addition & 1 deletion PCbuild/pythoncore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<ClInclude Include="..\Include\pyerrors.h" />
<ClInclude Include="..\Include\pyexpat.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\pymath.h" />
<ClInclude Include="..\Include\pytime.h" />
Expand Down
2 changes: 1 addition & 1 deletion PCbuild/pythoncore.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
<ClInclude Include="..\Include\pyfpe.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\pygetopt.h">
<ClInclude Include="..\Include\internal\pygetopt.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\pylifecycle.h">
Expand Down
2 changes: 1 addition & 1 deletion Python/getopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <stdio.h>
#include <string.h>
#include <wchar.h>
#include <pygetopt.h>
#include "internal/pygetopt.h"

#ifdef __cplusplus
extern "C" {
Expand Down