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
73215147
Commit
73215147
authored
Oct 09, 1995
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in optional argument error checking (and generated all
suites anew).
parent
a1db48b7
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
322 additions
and
381 deletions
+322
-381
Mac/Lib/toolbox/AppleScript_Suite.py
Mac/Lib/toolbox/AppleScript_Suite.py
+34
-34
Mac/Lib/toolbox/Metrowerks_Shell_Suite.py
Mac/Lib/toolbox/Metrowerks_Shell_Suite.py
+258
-323
Mac/Lib/toolbox/Required_Suite.py
Mac/Lib/toolbox/Required_Suite.py
+4
-4
Mac/Lib/toolbox/Standard_Suite.py
Mac/Lib/toolbox/Standard_Suite.py
+15
-15
Mac/scripts/gensuitemodule.py
Mac/scripts/gensuitemodule.py
+11
-5
No files found.
Mac/Lib/toolbox/AppleScript_Suite.py
View file @
73215147
This diff is collapsed.
Click to expand it.
Mac/Lib/toolbox/Metrowerks_Shell_Suite.py
View file @
73215147
This diff is collapsed.
Click to expand it.
Mac/Lib/toolbox/Required_Suite.py
View file @
73215147
...
...
@@ -25,9 +25,9 @@ class Required_Suite:
_code
=
'aevt'
_subcode
=
'odoc'
if
_arguments
:
raise
TypeError
,
'No optional args expected'
_arguments
[
'----'
]
=
_object
if
_arguments
:
raise
TypeError
,
'No optional args expected'
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
_arguments
,
_attributes
)
...
...
@@ -45,9 +45,9 @@ class Required_Suite:
_code
=
'aevt'
_subcode
=
'pdoc'
if
_arguments
:
raise
TypeError
,
'No optional args expected'
_arguments
[
'----'
]
=
_object
if
_arguments
:
raise
TypeError
,
'No optional args expected'
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
_arguments
,
_attributes
)
...
...
@@ -64,9 +64,9 @@ class Required_Suite:
_code
=
'aevt'
_subcode
=
'quit'
if
_arguments
:
raise
TypeError
,
'No optional args expected'
if
_no_object
!=
None
:
raise
TypeError
,
'No direct arg expected'
if
_arguments
:
raise
TypeError
,
'No optional args expected'
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
_arguments
,
_attributes
)
...
...
@@ -83,9 +83,9 @@ class Required_Suite:
_code
=
'aevt'
_subcode
=
'oapp'
if
_arguments
:
raise
TypeError
,
'No optional args expected'
if
_no_object
!=
None
:
raise
TypeError
,
'No direct arg expected'
if
_arguments
:
raise
TypeError
,
'No optional args expected'
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
_arguments
,
_attributes
)
...
...
Mac/Lib/toolbox/Standard_Suite.py
View file @
73215147
...
...
@@ -61,9 +61,9 @@ class Standard_Suite:
_code
=
'core'
_subcode
=
'qobj'
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_class_info
)
_arguments
[
'----'
]
=
_object
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_class_info
)
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
_arguments
,
_attributes
)
...
...
@@ -88,9 +88,9 @@ class Standard_Suite:
_code
=
'core'
_subcode
=
'clos'
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_close
)
_arguments
[
'----'
]
=
_object
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_close
)
aetools
.
enumsubst
(
_arguments
,
'savo'
,
_Enum_savo
)
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
...
...
@@ -115,9 +115,9 @@ class Standard_Suite:
_code
=
'core'
_subcode
=
'cnte'
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_count
)
_arguments
[
'----'
]
=
_object
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_count
)
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
_arguments
,
_attributes
)
...
...
@@ -141,9 +141,9 @@ class Standard_Suite:
_code
=
'core'
_subcode
=
'dsiz'
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_data_size
)
_arguments
[
'----'
]
=
_object
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_data_size
)
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
_arguments
,
_attributes
)
...
...
@@ -161,9 +161,9 @@ class Standard_Suite:
_code
=
'core'
_subcode
=
'delo'
if
_arguments
:
raise
TypeError
,
'No optional args expected'
_arguments
[
'----'
]
=
_object
if
_arguments
:
raise
TypeError
,
'No optional args expected'
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
_arguments
,
_attributes
)
...
...
@@ -187,9 +187,9 @@ class Standard_Suite:
_code
=
'core'
_subcode
=
'clon'
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_duplicate
)
_arguments
[
'----'
]
=
_object
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_duplicate
)
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
_arguments
,
_attributes
)
...
...
@@ -213,9 +213,9 @@ class Standard_Suite:
_code
=
'core'
_subcode
=
'gtei'
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_event_info
)
_arguments
[
'----'
]
=
_object
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_event_info
)
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
_arguments
,
_attributes
)
...
...
@@ -234,9 +234,9 @@ class Standard_Suite:
_code
=
'core'
_subcode
=
'doex'
if
_arguments
:
raise
TypeError
,
'No optional args expected'
_arguments
[
'----'
]
=
_object
if
_arguments
:
raise
TypeError
,
'No optional args expected'
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
_arguments
,
_attributes
)
...
...
@@ -265,9 +265,9 @@ class Standard_Suite:
_code
=
'core'
_subcode
=
'crel'
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_make
)
if
_no_object
!=
None
:
raise
TypeError
,
'No direct arg expected'
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_make
)
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
_arguments
,
_attributes
)
...
...
@@ -291,9 +291,9 @@ class Standard_Suite:
_code
=
'core'
_subcode
=
'move'
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_move
)
_arguments
[
'----'
]
=
_object
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_move
)
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
_arguments
,
_attributes
)
...
...
@@ -311,9 +311,9 @@ class Standard_Suite:
_code
=
'aevt'
_subcode
=
'odoc'
if
_arguments
:
raise
TypeError
,
'No optional args expected'
_arguments
[
'----'
]
=
_object
if
_arguments
:
raise
TypeError
,
'No optional args expected'
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
_arguments
,
_attributes
)
...
...
@@ -331,9 +331,9 @@ class Standard_Suite:
_code
=
'aevt'
_subcode
=
'pdoc'
if
_arguments
:
raise
TypeError
,
'No optional args expected'
_arguments
[
'----'
]
=
_object
if
_arguments
:
raise
TypeError
,
'No optional args expected'
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
_arguments
,
_attributes
)
...
...
@@ -355,9 +355,9 @@ class Standard_Suite:
_code
=
'aevt'
_subcode
=
'quit'
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_quit
)
if
_no_object
!=
None
:
raise
TypeError
,
'No direct arg expected'
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_quit
)
aetools
.
enumsubst
(
_arguments
,
'savo'
,
_Enum_savo
)
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
...
...
@@ -383,9 +383,9 @@ class Standard_Suite:
_code
=
'core'
_subcode
=
'save'
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_save
)
_arguments
[
'----'
]
=
_object
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_save
)
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
_arguments
,
_attributes
)
...
...
@@ -409,9 +409,9 @@ class Standard_Suite:
_code
=
'core'
_subcode
=
'gtsi'
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_suite_info
)
_arguments
[
'----'
]
=
_object
aetools
.
keysubst
(
_arguments
,
self
.
_argmap_suite_info
)
_reply
,
_arguments
,
_attributes
=
self
.
send
(
_code
,
_subcode
,
_arguments
,
_attributes
)
...
...
Mac/scripts/gensuitemodule.py
View file @
73215147
...
...
@@ -311,6 +311,16 @@ def compileevent(fp, event):
#
fp
.
write
(
"
\
t
\
t
_code = %s
\
n
"
%
`code`
)
fp
.
write
(
"
\
t
\
t
_subcode = %s
\
n
\
n
"
%
`subcode`
)
#
# Do keyword name substitution
#
if
arguments
:
fp
.
write
(
"
\
t
\
t
aetools.keysubst(_arguments, self._argmap_%s)
\
n
"
%
funcname
)
else
:
fp
.
write
(
"
\
t
\
t
if _arguments: raise TypeError, 'No optional args expected'
\
n
"
)
#
# Stuff required arg (if there is one) into arguments
#
if
has_arg
:
fp
.
write
(
"
\
t
\
t
_arguments['----'] = _object
\
n
"
)
elif
opt_arg
:
...
...
@@ -320,12 +330,8 @@ def compileevent(fp, event):
fp
.
write
(
"
\
t
\
t
if _no_object != None: raise TypeError, 'No direct arg expected'
\
n
"
)
fp
.
write
(
"
\
n
"
)
#
# Do
key
substitution
# Do
enum-name
substitution
#
if
arguments
:
fp
.
write
(
"
\
t
\
t
aetools.keysubst(_arguments, self._argmap_%s)
\
n
"
%
funcname
)
else
:
fp
.
write
(
"
\
t
\
t
if _arguments: raise TypeError, 'No optional args expected'
\
n
"
)
for
a
in
arguments
:
if
is_enum
(
a
[
2
]):
kname
=
a
[
1
]
...
...
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