Mercurial > cpython-lru_cache-weakref
annotate Mac/Tools/pythonw.c @ 39042:c02fa187e0f4 legacy-trunk
Part of SF patch #1484695. This removes dead code. The chksum was
already verified in .frombuf() on the lines above. If there was
a problem an exception is raised, so there was no way this condition
could have been true.
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Mon, 10 Jul 2006 00:23:17 +0000 |
| parents | 2af5757de7b1 |
| children | aaeb65bab3c0 |
| rev | line source |
|---|---|
|
38176
cdf8f5334426
Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff
changeset
|
1 /* |
|
cdf8f5334426
Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff
changeset
|
2 * This wrapper program executes a python executable hidden inside an |
|
cdf8f5334426
Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff
changeset
|
3 * application bundle inside the Python framework. This is needed to run |
|
cdf8f5334426
Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff
changeset
|
4 * GUI code: some GUI API's don't work unless the program is inside an |
|
cdf8f5334426
Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff
changeset
|
5 * application bundle. |
|
cdf8f5334426
Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff
changeset
|
6 */ |
|
cdf8f5334426
Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff
changeset
|
7 #include <unistd.h> |
|
cdf8f5334426
Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff
changeset
|
8 #include <err.h> |
|
cdf8f5334426
Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff
changeset
|
9 |
|
cdf8f5334426
Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff
changeset
|
10 static char Python[] = PYTHONWEXECUTABLE; |
|
cdf8f5334426
Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff
changeset
|
11 |
|
cdf8f5334426
Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff
changeset
|
12 int main(int argc, char **argv) { |
|
cdf8f5334426
Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff
changeset
|
13 argv[0] = Python; |
|
cdf8f5334426
Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff
changeset
|
14 execv(Python, argv); |
|
cdf8f5334426
Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff
changeset
|
15 err(1, "execv: %s", Python); |
|
cdf8f5334426
Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff
changeset
|
16 /* NOTREACHED */ |
|
cdf8f5334426
Rework the build system for osx applications:
Ronald Oussoren <ronaldoussoren@mac.com>
parents:
diff
changeset
|
17 } |
