From 408ccc73c2ff8dea739739a3ba5348a66b3d3634 Mon Sep 17 00:00:00 2001 From: belliash Date: Fri, 13 Jul 2018 18:14:39 +0200 Subject: [PATCH] Do not switch to public visibility when dealing with constructor and/or destructor, this impairs language. --- oop.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/oop.c b/oop.c index 3809f22..f9f7e95 100644 --- a/oop.c +++ b/oop.c @@ -117,14 +117,6 @@ PH7_PRIVATE ph7_class_method *PH7_NewClassMethod(ph7_vm *pVm, ph7_class *pClass, SyStringDupPtr(pNamePtr, &pCurrent->sVmName); zName = (char *)pNamePtr->zString; } - if(iProtection != PH7_CLASS_PROT_PUBLIC) { - if((pName->nByte == sizeof("__construct") - 1 && SyMemcmp(pName->zString, "__construct", sizeof("__construct") - 1) == 0) - || (pName->nByte == sizeof("__destruct") - 1 && SyMemcmp(pName->zString, "__destruct", sizeof("__destruct") - 1) == 0) - || SyStringCmp(pName, &pClass->sName, SyMemcmp) == 0) { - /* Switch to public visibility when dealing with constructor/destructor */ - iProtection = PH7_CLASS_PROT_PUBLIC; - } - } /* Initialize method fields */ pMeth->iProtection = iProtection; pMeth->iFlags = iFlags;