summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-04-28 16:04:12 (GMT)
committerGuido van Rossum <guido@python.org>1998-04-28 16:04:12 (GMT)
commit8b3c30c0eb82399bddf42dc8c9b0bf92f2566231 (patch)
treedcda7fc9651c152f316e6cd71251dee5afd1f95a
parent57a0661cb8f75fc984eff2dabd39f105dcbff33b (diff)
downloadcpython-8b3c30c0eb82399bddf42dc8c9b0bf92f2566231.zip
cpython-8b3c30c0eb82399bddf42dc8c9b0bf92f2566231.tar.gz
cpython-8b3c30c0eb82399bddf42dc8c9b0bf92f2566231.tar.bz2
class ByAddressType, a simple Type but passed by address even on
input. (Jack)
-rw-r--r--Tools/bgen/bgen/bgenType.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tools/bgen/bgen/bgenType.py b/Tools/bgen/bgen/bgenType.py
index ba9a53e..b63a06f 100644
--- a/Tools/bgen/bgen/bgenType.py
+++ b/Tools/bgen/bgen/bgenType.py
@@ -100,6 +100,13 @@ class Type:
"""
pass
+class ByAddressType(Type):
+ "Simple type that is also passed by address for input"
+
+ def passInput(self, name):
+ return "&%s" % name
+
+
# Sometimes it's useful to define a type that's only usable as input or output parameter