Typehinting merge #50

Merged
belliash merged 298 commits from typehinting into master 2019-04-17 11:27:52 +02:00
Showing only changes of commit f72d6c3922 - Show all commits

View File

@ -794,12 +794,14 @@ PH7_PRIVATE sxi32 PH7_MemObjStore(ph7_value *pSrc, ph7_value *pDest) {
PH7_PRIVATE sxi32 PH7_MemObjLoad(ph7_value *pSrc, ph7_value *pDest) {
SyMemcpy((const void *) & (*pSrc), &(*pDest),
sizeof(ph7_value) - (sizeof(ph7_vm *) + sizeof(SyBlob) + sizeof(sxu32)));
if(pSrc->iFlags & MEMOBJ_HASHMAP) {
/* Increment reference count */
((ph7_hashmap *)pSrc->x.pOther)->iRef++;
} else if(pSrc->iFlags & MEMOBJ_OBJ) {
/* Increment reference count */
((ph7_class_instance *)pSrc->x.pOther)->iRef++;
if(pSrc->x.pOther) {
if(pSrc->iFlags & MEMOBJ_HASHMAP) {
/* Increment reference count */
((ph7_hashmap *)pSrc->x.pOther)->iRef++;
} else if(pSrc->iFlags & MEMOBJ_OBJ) {
/* Increment reference count */
((ph7_class_instance *)pSrc->x.pOther)->iRef++;
}
}
if(SyBlobLength(&pDest->sBlob) > 0) {
SyBlobRelease(&pDest->sBlob);