Differences From Artifact [ab9f8c3844]:
- File src/th_lang.c — part of check-in [c25a5d199b] at 2012-07-16 18:56:11 on branch th1-query-api — Cleanups requested by DRH, plus some incidental consistency/maintenance-related cleanups found along the way. (user: stephan size: 24795)
To Artifact [c4c3211c2f]:
- File src/th_lang.c — part of check-in [bee0036681] at 2012-07-22 16:54:38 on branch th1-query-api — Fixed a memleak in the th1 variadic proc args support. (user: stephan size: 24846)
| ︙ | |||
369 370 371 372 373 374 375 376 377 378 379 380 381 382 | 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 | + + + |
if( p->hasArgs ){
char *zArgs = 0;
int nArgs = 0;
for(i=p->nParam+1; i<pArgs->argc; i++){
Th_ListAppend(interp, &zArgs, &nArgs, pArgs->argv[i], pArgs->argl[i]);
}
Th_SetVar(interp, (const char *)"args", -1, zArgs, nArgs);
if(zArgs){
Th_Free(interp, zArgs);
}
}
Th_SetResult(interp, 0, 0);
return Th_Eval(interp, 0, p->zProgram, p->nProgram);
}
/*
|
| ︙ |