Explorar el Código

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 hace 11 años
padre
commit
75879e774a
Se han modificado 1 ficheros con 8 adiciones y 4 borrados
  1. 8
    4
      dsp/cmDspClass.c

+ 8
- 4
dsp/cmDspClass.c Ver fichero

@@ -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,8 +279,10 @@ 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
   }
284
+
285
+  va_end(vl1);
283 286
   
284 287
   cmDspVarArg_t aa[ argCnt+1 ];
285 288
   unsigned j=0;
@@ -287,7 +290,7 @@ void* cmDspInstAllocateV(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned instB
287 290
   {
288 291
     cmDspVarArg_t a;
289 292
     
290
-    _cmDspParseArgV(&a,vl2);
293
+    vl2 = _cmDspParseArgV(&a,vl2);
291 294
     
292 295
     cmDspArgSetupN(ctx,aa,argCnt,j,repeatCnt,a.label,a.constId,a.rn, a.cn, a.flags, a.doc ); 
293 296
     j += repeatCnt;
@@ -295,7 +298,7 @@ void* cmDspInstAllocateV(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned instB
295 298
   }
296 299
   cmDspArgSetupNull(aa + argCnt);
297 300
 
298
-  va_end(vl1);
301
+  va_end(vl2);
299 302
 
300 303
   return cmDspInstAllocate(ctx,classPtr,aa,instByteCnt,instSymId,instId,storeSymId,va_cnt,vl0);
301 304
 }
@@ -368,6 +371,7 @@ cmDspRC_t _cmDspClassErrV( cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned ins
368 371
   else
369 372
     cmErrMsg( &classPtr->err, rc, "%s DSP Class:%s Inst:%i",buf, classPtr->labelStr,instId);
370 373
 
374
+  va_end(vl2);
371 375
   return rc;
372 376
 }
373 377
 

Loading…
Cancelar
Guardar