Browse Source

cmDspClass.c : _cmDspParseArgV() now returns a va_list. This seems to

now be required to work with the OSX 32bit build. Added missing va_end() in _cmDspClassErrV().
master
kevin 11 years ago
parent
commit
75879e774a
1 changed files with 8 additions and 4 deletions
  1. 8
    4
      dsp/cmDspClass.c

+ 8
- 4
dsp/cmDspClass.c View File

250
   return p;
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
   a->label   = va_arg(vl,const char*);
255
   a->label   = va_arg(vl,const char*);
256
   a->constId = va_arg(vl,unsigned);
256
   a->constId = va_arg(vl,unsigned);
258
   a->cn      = va_arg(vl,unsigned);
258
   a->cn      = va_arg(vl,unsigned);
259
   a->flags   = va_arg(vl,unsigned);
259
   a->flags   = va_arg(vl,unsigned);
260
   a->doc     = va_arg(vl,const char*);  
260
   a->doc     = va_arg(vl,const char*);  
261
+  return vl;
261
 }
262
 }
262
 
263
 
263
 void* cmDspInstAllocateV(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned instByteCnt, unsigned instSymId, unsigned instId, unsigned storeSymId, unsigned va_cnt, va_list vl0, ... )
264
 void* cmDspInstAllocateV(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned instByteCnt, unsigned instSymId, unsigned instId, unsigned storeSymId, unsigned va_cnt, va_list vl0, ... )
278
     
279
     
279
     argCnt += repeatCnt;
280
     argCnt += repeatCnt;
280
 
281
 
281
-    _cmDspParseArgV(&a,vl1);
282
+    vl1 = _cmDspParseArgV(&a,vl1);
282
   }
283
   }
284
+
285
+  va_end(vl1);
283
   
286
   
284
   cmDspVarArg_t aa[ argCnt+1 ];
287
   cmDspVarArg_t aa[ argCnt+1 ];
285
   unsigned j=0;
288
   unsigned j=0;
287
   {
290
   {
288
     cmDspVarArg_t a;
291
     cmDspVarArg_t a;
289
     
292
     
290
-    _cmDspParseArgV(&a,vl2);
293
+    vl2 = _cmDspParseArgV(&a,vl2);
291
     
294
     
292
     cmDspArgSetupN(ctx,aa,argCnt,j,repeatCnt,a.label,a.constId,a.rn, a.cn, a.flags, a.doc ); 
295
     cmDspArgSetupN(ctx,aa,argCnt,j,repeatCnt,a.label,a.constId,a.rn, a.cn, a.flags, a.doc ); 
293
     j += repeatCnt;
296
     j += repeatCnt;
295
   }
298
   }
296
   cmDspArgSetupNull(aa + argCnt);
299
   cmDspArgSetupNull(aa + argCnt);
297
 
300
 
298
-  va_end(vl1);
301
+  va_end(vl2);
299
 
302
 
300
   return cmDspInstAllocate(ctx,classPtr,aa,instByteCnt,instSymId,instId,storeSymId,va_cnt,vl0);
303
   return cmDspInstAllocate(ctx,classPtr,aa,instByteCnt,instSymId,instId,storeSymId,va_cnt,vl0);
301
 }
304
 }
368
   else
371
   else
369
     cmErrMsg( &classPtr->err, rc, "%s DSP Class:%s Inst:%i",buf, classPtr->labelStr,instId);
372
     cmErrMsg( &classPtr->err, rc, "%s DSP Class:%s Inst:%i",buf, classPtr->labelStr,instId);
370
 
373
 
374
+  va_end(vl2);
371
   return rc;
375
   return rc;
372
 }
376
 }
373
 
377
 

Loading…
Cancel
Save