From d7ad60572c424dedcdfbc5ea371bf83e236375f3 Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 15 Jun 2001 16:29:10 +0000 Subject: [PATCH] expose config_express --- panda/src/express/config_express.N | 3 ++- panda/src/express/config_express.cxx | 9 +++++++++ panda/src/express/config_express.h | 6 ++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/panda/src/express/config_express.N b/panda/src/express/config_express.N index 165be98b8b..9ebe60202d 100644 --- a/panda/src/express/config_express.N +++ b/panda/src/express/config_express.N @@ -4,4 +4,5 @@ forcetype Notify forcetype NotifyCategory forcetype NotifySeverity - +forcetype ConfigExpress +renametype ConfigExpress ConfigExpress diff --git a/panda/src/express/config_express.cxx b/panda/src/express/config_express.cxx index 6e4768352f..946cf1d023 100644 --- a/panda/src/express/config_express.cxx +++ b/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; +} + diff --git a/panda/src/express/config_express.h b/panda/src/express/config_express.h index cdc1846e88..93599bd4f6 100644 --- a/panda/src/express/config_express.h +++ b/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 ConfigExpress; +EXPCL_PANDAEXPRESS ConfigExpress &get_config_express(); +END_PUBLISH + #endif /* __CONFIG_UTIL_H__ */