*/}}
Browse Source

Ensure correct LastPs

ChengduLittleA 9 months ago
parent
commit
e8d19f8f94
3 changed files with 6 additions and 4 deletions
  1. 3 1
      la_data.c
  2. 1 1
      la_data.h
  3. 2 2
      la_kernel.c

+ 3 - 1
la_data.c

@@ -278,7 +278,9 @@ int la_GetPropFromPath(laPropPack *Self, laPropPack *Base, const char *Path, voi
 
         if (!Path || !Path[0] || !ss){
             if (Base){
-                la_NewPropStep(Self, Base->LastPs->p,Base->LastPs->UseInstance,Base->LastPs->Type);
+                Self->LastPs = Base->LastPs;
+                //Self->ReusedPs = 1;
+                //la_NewPropStep(Self, Base->LastPs->p,Base->LastPs->UseInstance,Base->LastPs->Type);
             }
         }
     }

+ 1 - 1
la_data.h

@@ -184,7 +184,7 @@ STRUCTURE(laPropPack){
     laPropStep *LastPs;
     laPropPack *RawThis;
     char LastIndex;
-    void *CopyRef;       //Also template creation
+    //char ReusedPs;
 };
 
 STRUCTURE(laProp){

+ 2 - 2
la_kernel.c

@@ -4512,8 +4512,8 @@ void la_DestroyUiItem(laUiItem *ui, int RemoveUsers){
     la_StopUiOperatorService(ui);
     strSafeDestroy(&ui->ExtraInstructions);strDestroyStringSplitor(&ui->Instructions);
     strSafeDestroy(&ui->Display);
-    if (RemoveUsers && ui->PP.LastPs && ui->PP.LastPs->p->Container->Hyper)
-        { /*la_StopUsingPropPack(&ui->PP);*/ }
+    //if (RemoveUsers && ui->PP.LastPs && ui->PP.LastPs->p->Container->Hyper)
+    //    { /*la_StopUsingPropPack(&ui->PP);*/ }
         //laStopUsingDataBlock(ui->PP.LastPs->UseInstance,ui->PP.LastPs->p,MAIN.PropMatcherContextP);
     la_FreePropStepCache(ui->PP.Go); //-------[Up Here], instance already been freed.XXXXXXXXXXXX!!!!!!!!!!1
     if (ui->Type->Destroy) ui->Type->Destroy(ui);