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
91cae85c
Commit
91cae85c
authored
Oct 01, 1999
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optionally bracket all external declarations of init functions with "ifndef"s.
parent
2afc2c74
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
Mac/Tools/macfreeze/macfreeze.py
Mac/Tools/macfreeze/macfreeze.py
+2
-2
Mac/Tools/macfreeze/macgen_src.py
Mac/Tools/macfreeze/macgen_src.py
+2
-2
No files found.
Mac/Tools/macfreeze/macfreeze.py
View file @
91cae85c
...
...
@@ -38,7 +38,7 @@ def main():
if
mustwait
:
sys
.
exit
(
1
)
def
process
(
gentype
,
program
,
output
,
modules
=
[],
module_files
=
[],
debug
=
0
):
def
process
(
gentype
,
program
,
output
,
modules
=
[],
module_files
=
[],
debug
=
0
,
with_ifdef
=
0
):
try
:
module_dict
=
macmodulefinder
.
process
(
program
,
modules
,
module_files
,
debug
)
except
macmodulefinder
.
Missing
,
arg
:
...
...
@@ -54,7 +54,7 @@ def process(gentype, program, output, modules=[], module_files=[], debug=0):
return
1
# So the user can inspect it
elif
gentype
==
'source'
:
import
macgen_src
warnings
=
macgen_src
.
generate
(
output
,
module_dict
,
debug
)
warnings
=
macgen_src
.
generate
(
output
,
module_dict
,
debug
,
with_ifdef
)
return
warnings
elif
gentype
==
'resource'
:
import
macgen_rsrc
...
...
Mac/Tools/macfreeze/macgen_src.py
View file @
91cae85c
...
...
@@ -15,7 +15,7 @@ PROJECT_TEMPLATE=os.path.join(TEMPLATEDIR, ':frozen.prj')
CONFIG_TEMPLATE
=
os
.
path
.
join
(
TEMPLATEDIR
,
':templatefrozenconfig.c'
)
BUNDLE_TEMPLATE
=
os
.
path
.
join
(
TEMPLATEDIR
,
':frozenbundle.rsrc'
)
def
generate
(
output
,
module_dict
,
debug
=
0
):
def
generate
(
output
,
module_dict
,
debug
=
0
,
with_ifdef
=
0
):
problems
=
0
output_created
=
0
if
not
os
.
path
.
exists
(
output
):
...
...
@@ -91,7 +91,7 @@ def generate(output, module_dict, debug=0):
c_modules
.
append
(
module
)
ifp
=
open
(
CONFIG_TEMPLATE
)
ofp
=
open
(
config_name
,
'w'
)
makeconfig
.
makeconfig
(
ifp
,
ofp
,
c_modules
)
makeconfig
.
makeconfig
(
ifp
,
ofp
,
c_modules
,
with_ifdef
)
ifp
.
close
()
ofp
.
close
()
MacOS
.
SetCreatorAndType
(
config_name
,
'CWIE'
,
'TEXT'
)
...
...
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