File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -8295,7 +8295,7 @@ procedure TPythonType.Initialize;
82958295
82968296procedure  TPythonType.Finalize ;
82978297begin 
8298-   Engine.Py_XDECREF (FCreateFunc);
8298+   Engine.Py_CLEAR (FCreateFunc);
82998299  FCreateFunc := nil ;
83008300  inherited ;
83018301end ;
@@ -8357,7 +8357,8 @@ procedure TPythonType.AddTypeVar;
83578357      FCreateFuncDef.ml_meth  := GetOfObjectCallBack( TCallBack(meth), 2 , DEFAULT_CALLBACK_TYPE);
83588358      FCreateFuncDef.ml_flags := METH_VARARGS;
83598359      FCreateFuncDef.ml_doc   := PAnsiChar(FCreateFuncDoc);
8360-       FCreateFunc := Engine.PyCFunction_NewEx(@FCreateFuncDef, nil , nil )
8360+       FCreateFunc := Engine.PyCFunction_NewEx(@FCreateFuncDef, nil , nil );
8361+       Engine.Py_INCREF(FCreateFunc);
83618362    end ;
83628363    Assert(Assigned(FCreateFunc));
83638364  end ;
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments