Browse Source

remove old api calls

David Rose 16 years ago
parent
commit
9e7337557a

+ 2 - 1
direct/src/showbase/ExceptionVarDump.py

@@ -1,4 +1,4 @@
-from pandac.PandaModules import ConfigConfigureGetConfigConfigShowbase as config
+from pandac.PandaModules import getConfigShowbase
 from direct.directnotify.DirectNotifyGlobal import directNotify
 from direct.directnotify.DirectNotifyGlobal import directNotify
 from direct.showbase.PythonUtil import fastRepr
 from direct.showbase.PythonUtil import fastRepr
 from exceptions import Exception
 from exceptions import Exception
@@ -7,6 +7,7 @@ import types
 import traceback
 import traceback
 
 
 notify = directNotify.newCategory("ExceptionVarDump")
 notify = directNotify.newCategory("ExceptionVarDump")
+config = getConfigShowbase()
 
 
 reentry = 0
 reentry = 0
 
 

+ 2 - 1
direct/src/showbase/PythonUtil.py

@@ -3746,7 +3746,8 @@ class HierarchyException(Exception):
 # __dev__ is not defined at import time, call this after it's defined
 # __dev__ is not defined at import time, call this after it's defined
 def recordFunctorCreationStacks():
 def recordFunctorCreationStacks():
     global Functor
     global Functor
-    from pandac.PandaModules import ConfigConfigureGetConfigConfigShowbase as config
+    from pandac.PandaModules import getConfigShowbase
+    config = getConfigShowbase()
     if __dev__ and config.GetBool('record-functor-creation-stacks', 1):
     if __dev__ and config.GetBool('record-functor-creation-stacks', 1):
         if not hasattr(Functor, '_functorCreationStacksRecorded'):
         if not hasattr(Functor, '_functorCreationStacksRecorded'):
             Functor = recordCreationStackStr(Functor)
             Functor = recordCreationStackStr(Functor)

+ 1 - 2
direct/src/showbase/ShowBase.py

@@ -11,7 +11,7 @@ from pandac.PandaModules import *
 
 
 # This needs to be available early for DirectGUI imports
 # This needs to be available early for DirectGUI imports
 import __builtin__
 import __builtin__
-__builtin__.config = ConfigConfigureGetConfigConfigShowbase
+__builtin__.config = getConfigShowbase()
 
 
 from direct.directnotify.DirectNotifyGlobal import *
 from direct.directnotify.DirectNotifyGlobal import *
 from MessengerGlobal import *
 from MessengerGlobal import *
@@ -68,7 +68,6 @@ class ShowBase(DirectObject.DirectObject):
         self.debugRunningMultiplier = 4
         self.debugRunningMultiplier = 4
         
         
         # Get the dconfig object
         # Get the dconfig object
-        #self.config = ConfigConfigureGetConfigConfigShowbase
         self.config = config
         self.config = config
         # Setup wantVerifyPdb as soon as reasonable:
         # Setup wantVerifyPdb as soon as reasonable:
         Verify.wantVerifyPdb = self.config.GetBool('want-verify-pdb', 0)
         Verify.wantVerifyPdb = self.config.GetBool('want-verify-pdb', 0)

+ 10 - 6
pandatool/src/flt/config_flt.cxx

@@ -50,12 +50,16 @@
 Configure(config_flt);
 Configure(config_flt);
 NotifyCategoryDef(flt, "");
 NotifyCategoryDef(flt, "");
 
 
-// Set this true to trigger an assertion failure (and core dump)
-// immediately when an error is detected on reading or writing a flt
-// file.  This is primarily useful for debugging the flt reader
-// itself, to generate a stack trace to determine precisely at what
-// point a flt file failed.
-const bool flt_error_abort = config_flt.GetBool("flt-error-abort", false);
+
+ConfigVariableBool flt_error_abort
+("flt-error-abort", false,
+ PRC_DESC("Set this true to trigger an assertion failure (and core dump) "
+          "immediately when an error is detected on reading or writing a flt "
+          "file.  This is primarily useful for debugging the flt reader itself, "
+          "to generate a stack trace to determine precisely at what point a flt "
+
+          "file failed."));
+
 
 
 ConfigureFn(config_flt) {
 ConfigureFn(config_flt) {
   init_libflt();
   init_libflt();

+ 2 - 1
pandatool/src/flt/config_flt.h

@@ -18,10 +18,11 @@
 #include "pandatoolbase.h"
 #include "pandatoolbase.h"
 
 
 #include "notifyCategoryProxy.h"
 #include "notifyCategoryProxy.h"
+#include "configVariableBool.h"
 
 
 NotifyCategoryDeclNoExport(flt);
 NotifyCategoryDeclNoExport(flt);
 
 
-extern const bool flt_error_abort;
+extern ConfigVariableBool flt_error_abort;
 
 
 extern void init_libflt();
 extern void init_libflt();