Browse Source

expose config_express

David Rose 24 years ago
parent
commit
d7ad60572c

+ 2 - 1
panda/src/express/config_express.N

@@ -4,4 +4,5 @@ forcetype Notify
 forcetype NotifyCategory
 forcetype NotifySeverity
 
-
+forcetype ConfigExpress
+renametype ConfigExpress ConfigExpress

+ 9 - 0
panda/src/express/config_express.cxx

@@ -110,3 +110,12 @@ const int patchfile_buffer_size =
 
 const int patchfile_zone_size =
         config_express.GetInt("patchfile-zone-size", 10000);
+
+
+// Returns the configure object for accessing config variables from a
+// scripting language.
+ConfigExpress &
+get_config_express() {
+  return config_express;
+}
+

+ 6 - 0
panda/src/express/config_express.h

@@ -42,4 +42,10 @@ extern const int patchfile_increment_size;
 extern const int patchfile_buffer_size;
 extern const int patchfile_zone_size;
 
+// Expose the Config variable for Python access.
+BEGIN_PUBLISH
+typedef Config::Config<ConfigureGetConfig_config_express> ConfigExpress;
+EXPCL_PANDAEXPRESS ConfigExpress &get_config_express();
+END_PUBLISH
+
 #endif /* __CONFIG_UTIL_H__ */