Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
21ecbe98
Commit
21ecbe98
authored
May 20, 1997
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make delimiter and separator static for K&R C.
parent
2f7b5f40
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
Modules/getpath.c
Modules/getpath.c
+11
-3
No files found.
Modules/getpath.c
View file @
21ecbe98
...
@@ -152,6 +152,7 @@ PERFORMANCE OF THIS SOFTWARE.
...
@@ -152,6 +152,7 @@ PERFORMANCE OF THIS SOFTWARE.
static
char
prefix
[
MAXPATHLEN
+
1
];
static
char
prefix
[
MAXPATHLEN
+
1
];
static
char
exec_prefix
[
MAXPATHLEN
+
1
];
static
char
exec_prefix
[
MAXPATHLEN
+
1
];
static
char
progpath
[
MAXPATHLEN
+
1
];
static
char
*
module_search_path
=
NULL
;
static
char
*
module_search_path
=
NULL
;
static
char
lib_python
[
20
];
/* Dynamically set to "lib/python" VERSION */
static
char
lib_python
[
20
];
/* Dynamically set to "lib/python" VERSION */
...
@@ -324,15 +325,14 @@ calculate_path()
...
@@ -324,15 +325,14 @@ calculate_path()
{
{
extern
char
*
Py_GetProgramName
();
extern
char
*
Py_GetProgramName
();
char
delimiter
[
2
]
=
{
DELIM
,
'\0'
};
static
char
delimiter
[
2
]
=
{
DELIM
,
'\0'
};
char
separator
[
2
]
=
{
SEP
,
'\0'
};
static
char
separator
[
2
]
=
{
SEP
,
'\0'
};
char
*
pythonpath
=
PYTHONPATH
;
char
*
pythonpath
=
PYTHONPATH
;
char
*
rtpypath
=
getenv
(
"PYTHONPATH"
);
char
*
rtpypath
=
getenv
(
"PYTHONPATH"
);
char
*
home
=
getenv
(
"PYTHONHOME"
);
char
*
home
=
getenv
(
"PYTHONHOME"
);
char
*
path
=
getenv
(
"PATH"
);
char
*
path
=
getenv
(
"PATH"
);
char
*
prog
=
Py_GetProgramName
();
char
*
prog
=
Py_GetProgramName
();
char
argv0_path
[
MAXPATHLEN
+
1
];
char
argv0_path
[
MAXPATHLEN
+
1
];
char
progpath
[
MAXPATHLEN
+
1
];
int
pfound
,
efound
;
/* 1 if found; -1 if found build directory */
int
pfound
,
efound
;
/* 1 if found; -1 if found build directory */
char
*
buf
;
char
*
buf
;
int
bufsz
;
int
bufsz
;
...
@@ -543,3 +543,11 @@ Py_GetExecPrefix()
...
@@ -543,3 +543,11 @@ Py_GetExecPrefix()
calculate_path
();
calculate_path
();
return
exec_prefix
;
return
exec_prefix
;
}
}
char
*
Py_GetProgramFullPath
()
{
if
(
!
module_search_path
)
calculate_path
();
return
progpath
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment