Correct coding style

This commit is contained in:
Rafal Kupiec 2018-07-15 11:57:22 +02:00
parent 4b05081d4a
commit 6d0e346b7d
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4

12
vm.c
View File

@ -6444,7 +6444,7 @@ static int vm_builtin_register_autoload_handler(ph7_context *pCtx, int nArg, ph7
PH7_MemObjInit(pCtx->pVm, &sEntry.aArg[0]); PH7_MemObjInit(pCtx->pVm, &sEntry.aArg[0]);
PH7_MemObjStore(appArg[0], &sEntry.aArg[0]); PH7_MemObjStore(appArg[0], &sEntry.aArg[0]);
/* Install the callback */ /* Install the callback */
SySetPut(&pCtx->pVm->aAutoLoad, (const void *)&sEntry); SySetPut(&pCtx->pVm->aAutoLoad, (const void *)&sEntry);
ph7_result_bool(pCtx, 1); ph7_result_bool(pCtx, 1);
return PH7_OK; return PH7_OK;
} }
@ -13681,16 +13681,16 @@ PH7_PRIVATE ph7_class *PH7_VmExtractClass(
for(n = 0; n < nEntry; n++) { for(n = 0; n < nEntry; n++) {
sEntry = (VmAutoLoadCB *) SySetAt(&pVm->aAutoLoad, n); sEntry = (VmAutoLoadCB *) SySetAt(&pVm->aAutoLoad, n);
if(sEntry) { if(sEntry) {
PH7_MemObjInitFromString(pVm,&sName,0); PH7_MemObjInitFromString(pVm, &sName, 0);
PH7_MemObjStringAppend(&sName,zName,nByte); PH7_MemObjStringAppend(&sName, zName, nByte);
apArg[0] = &sName; apArg[0] = &sName;
/* Call autoloader */ /* Call autoloader */
PH7_MemObjInit(pVm,&sResult); PH7_MemObjInit(pVm, &sResult);
PH7_VmCallUserFunction(pVm,&sEntry->sCallback,1,apArg,&sResult); PH7_VmCallUserFunction(pVm, &sEntry->sCallback, 1, apArg, &sResult);
PH7_MemObjRelease(&sResult); PH7_MemObjRelease(&sResult);
PH7_MemObjRelease(&sName); PH7_MemObjRelease(&sName);
/* Perform a hash loopkup once again */ /* Perform a hash loopkup once again */
pEntry = SyHashGet(&pVm->hClass,(const void *)zName,nByte); pEntry = SyHashGet(&pVm->hClass, (const void *)zName, nByte);
if(pEntry) { if(pEntry) {
/* Do not call more callbacks if class is already available */ /* Do not call more callbacks if class is already available */
break; break;