Переглянути джерело

cmDspClass.c: _cmDspParseArgV() now returns the va_list. This seemed to solve a OS-X problem with va_arg() parsing.

master
kevin 11 роки тому
джерело
коміт
a9a615f94e
1 змінених файлів з 4 додано та 3 видалено
  1. 4
    3
      dsp/cmDspClass.c

+ 4
- 3
dsp/cmDspClass.c Переглянути файл

@@ -250,7 +250,7 @@ void* cmDspInstAllocate(
250 250
   return p;
251 251
 }
252 252
 
253
-void _cmDspParseArgV( cmDspVarArg_t* a, va_list vl )
253
+va_list  _cmDspParseArgV( cmDspVarArg_t* a, va_list vl )
254 254
 {
255 255
   a->label   = va_arg(vl,const char*);
256 256
   a->constId = va_arg(vl,unsigned);
@@ -258,6 +258,7 @@ void _cmDspParseArgV( cmDspVarArg_t* a, va_list vl )
258 258
   a->cn      = va_arg(vl,unsigned);
259 259
   a->flags   = va_arg(vl,unsigned);
260 260
   a->doc     = va_arg(vl,const char*);  
261
+  return vl;
261 262
 }
262 263
 
263 264
 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
278 279
     
279 280
     argCnt += repeatCnt;
280 281
 
281
-    _cmDspParseArgV(&a,vl1);
282
+    vl1 = _cmDspParseArgV(&a,vl1);
282 283
   }
283 284
   
284 285
   cmDspVarArg_t aa[ argCnt+1 ];
@@ -287,7 +288,7 @@ void* cmDspInstAllocateV(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned instB
287 288
   {
288 289
     cmDspVarArg_t a;
289 290
     
290
-    _cmDspParseArgV(&a,vl2);
291
+    vl2 = _cmDspParseArgV(&a,vl2);
291 292
     
292 293
     cmDspArgSetupN(ctx,aa,argCnt,j,repeatCnt,a.label,a.constId,a.rn, a.cn, a.flags, a.doc ); 
293 294
     j += repeatCnt;

Завантаження…
Відмінити
Зберегти