aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code/poolabs.c
diff options
context:
space:
mode:
authorRichard Brooksby2013-05-08 22:43:51 +0100
committerRichard Brooksby2013-05-08 22:43:51 +0100
commit71b7e4f70a710acc666bbdf55502c1ef66c76a09 (patch)
tree3111a146c2266cbfafa0688843b2c08d4281ad7c /mps/code/poolabs.c
parentd396431c252b0f6330c1c31995adddfcd0bad7ae (diff)
downloademacs-71b7e4f70a710acc666bbdf55502c1ef66c76a09.tar.gz
emacs-71b7e4f70a710acc666bbdf55502c1ef66c76a09.zip
Pushing varargs decoding into a pool class method. much simpler.
Copied from Perforce Change: 181642 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code/poolabs.c')
-rw-r--r--mps/code/poolabs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mps/code/poolabs.c b/mps/code/poolabs.c
index 1456ec66143..6fc0e279cb8 100644
--- a/mps/code/poolabs.c
+++ b/mps/code/poolabs.c
@@ -122,6 +122,7 @@ DEFINE_CLASS(AbstractPoolClass, class)
122 class->size = 0; 122 class->size = 0;
123 class->offset = 0; 123 class->offset = 0;
124 class->attr = 0; 124 class->attr = 0;
125 class->varargs = PoolTrivVarargs;
125 class->init = PoolTrivInit; 126 class->init = PoolTrivInit;
126 class->finish = PoolTrivFinish; 127 class->finish = PoolTrivFinish;
127 class->alloc = PoolNoAlloc; 128 class->alloc = PoolNoAlloc;
@@ -194,6 +195,13 @@ void PoolTrivFinish(Pool pool)
194 NOOP; 195 NOOP;
195} 196}
196 197
198void PoolTrivVarargs(ArgStruct args[], va_list varargs)
199{
200 UNUSED(varargs);
201 args[0].key = MPS_KEY_ARGS_END;
202 AVER(ArgListCheck(args));
203}
204
197Res PoolTrivInit(Pool pool, ArgList args) 205Res PoolTrivInit(Pool pool, ArgList args)
198{ 206{
199 AVERT(Pool, pool); 207 AVERT(Pool, pool);