From a9a615f94e6a50deff8ce3efecb3eac68edfdd67 Mon Sep 17 00:00:00 2001 From: kevin Date: Wed, 22 May 2013 10:32:45 -0700 Subject: [PATCH] cmDspClass.c: _cmDspParseArgV() now returns the va_list. This seemed to solve a OS-X problem with va_arg() parsing. --- dsp/cmDspClass.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dsp/cmDspClass.c b/dsp/cmDspClass.c index 83d2c6b..327b49f 100644 --- a/dsp/cmDspClass.c +++ b/dsp/cmDspClass.c @@ -250,7 +250,7 @@ void* cmDspInstAllocate( return p; } -void _cmDspParseArgV( cmDspVarArg_t* a, va_list vl ) +va_list _cmDspParseArgV( cmDspVarArg_t* a, va_list vl ) { a->label = va_arg(vl,const char*); a->constId = va_arg(vl,unsigned); @@ -258,6 +258,7 @@ void _cmDspParseArgV( cmDspVarArg_t* a, va_list vl ) a->cn = va_arg(vl,unsigned); a->flags = va_arg(vl,unsigned); a->doc = va_arg(vl,const char*); + return vl; } void* cmDspInstAllocateV(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned instByteCnt, unsigned instSymId, unsigned instId, unsigned storeSymId, unsigned va_cnt, va_list vl0, ... ) @@ -278,7 +279,7 @@ void* cmDspInstAllocateV(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned instB argCnt += repeatCnt; - _cmDspParseArgV(&a,vl1); + vl1 = _cmDspParseArgV(&a,vl1); } cmDspVarArg_t aa[ argCnt+1 ]; @@ -287,7 +288,7 @@ void* cmDspInstAllocateV(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned instB { cmDspVarArg_t a; - _cmDspParseArgV(&a,vl2); + vl2 = _cmDspParseArgV(&a,vl2); cmDspArgSetupN(ctx,aa,argCnt,j,repeatCnt,a.label,a.constId,a.rn, a.cn, a.flags, a.doc ); j += repeatCnt;