No need to store information about line number in ph7_class struct.
All checks were successful
The build was successful.
All checks were successful
The build was successful.
This commit is contained in:
@@ -3710,7 +3710,7 @@ static sxi32 PH7_CompileClassInterface(ph7_gen_state *pGen) {
|
||||
/* Advance the stream cursor */
|
||||
pGen->pIn++;
|
||||
/* Obtain a raw class */
|
||||
pClass = PH7_NewRawClass(pGen->pVm, pName, nLine);
|
||||
pClass = PH7_NewRawClass(pGen->pVm, pName);
|
||||
if(pClass == 0) {
|
||||
PH7_GenCompileError(pGen, E_ERROR, nLine, "Fatal, PH7 is running out of memory");
|
||||
return SXERR_ABORT;
|
||||
@@ -3947,7 +3947,7 @@ static sxi32 PH7_GenStateCompileClass(ph7_gen_state *pGen, sxi32 iFlags) {
|
||||
/* Advance the stream cursor */
|
||||
pGen->pIn++;
|
||||
/* Obtain a raw class */
|
||||
pClass = PH7_NewRawClass(pGen->pVm, pName, nLine);
|
||||
pClass = PH7_NewRawClass(pGen->pVm, pName);
|
||||
if(pClass == 0) {
|
||||
PH7_GenCompileError(pGen, E_ERROR, nLine, "Fatal, PH7 is running out of memory");
|
||||
return SXERR_ABORT;
|
||||
|
@@ -46,7 +46,7 @@ PH7_PRIVATE ph7_class_info *PH7_NewClassInfo(ph7_vm *pVm, const SyString *pName)
|
||||
* Create an empty class.
|
||||
* Return a pointer to a raw class (ph7_class instance) on success. NULL otherwise.
|
||||
*/
|
||||
PH7_PRIVATE ph7_class *PH7_NewRawClass(ph7_vm *pVm, const SyString *pName, sxu32 nLine) {
|
||||
PH7_PRIVATE ph7_class *PH7_NewRawClass(ph7_vm *pVm, const SyString *pName) {
|
||||
ph7_class *pClass;
|
||||
char *zName;
|
||||
/* Allocate a new instance */
|
||||
@@ -68,7 +68,6 @@ PH7_PRIVATE ph7_class *PH7_NewRawClass(ph7_vm *pVm, const SyString *pName, sxu32
|
||||
SyHashInit(&pClass->hAttr, &pVm->sAllocator, 0, 0);
|
||||
SyHashInit(&pClass->hDerived, &pVm->sAllocator, 0, 0);
|
||||
SySetInit(&pClass->aInterface, &pVm->sAllocator, sizeof(ph7_class *));
|
||||
pClass->nLine = nLine;
|
||||
/* All done */
|
||||
return pClass;
|
||||
}
|
||||
|
Reference in New Issue
Block a user