diff options
author | Jim Carroll <thecarrolls@jiminger.com> | 2012-09-17 23:18:22 -0400 |
---|---|---|
committer | Jim Carroll <thecarrolls@jiminger.com> | 2012-09-17 23:36:48 -0400 |
commit | cd36870992ffb6c08c35453ae666523336341319 (patch) | |
tree | 217a3c5a14517180064302a0adb6bd19181d569a | |
parent | b4f39145fb9d41f928de6e2fc3da1f2a2c149364 (diff) |
Separated the MakePendingCalls from the delayed call functionality.
-rw-r--r-- | xbmc/interfaces/legacy/LanguageHook.h | 4 | ||||
-rw-r--r-- | xbmc/interfaces/python/LanguageHook.cpp | 8 | ||||
-rw-r--r-- | xbmc/interfaces/python/LanguageHook.h | 3 |
3 files changed, 12 insertions, 3 deletions
diff --git a/xbmc/interfaces/legacy/LanguageHook.h b/xbmc/interfaces/legacy/LanguageHook.h index c1a297e4c4..87ff6cccbf 100644 --- a/xbmc/interfaces/legacy/LanguageHook.h +++ b/xbmc/interfaces/legacy/LanguageHook.h @@ -74,6 +74,8 @@ namespace XBMCAddon */ virtual void delayedCallClose() { } + virtual void makePendingCalls() {} + /** * For scripting languages that need a global callback handler, this * method should be overloaded to supply one. @@ -147,6 +149,8 @@ namespace XBMCAddon if (clearOnExit) LanguageHook::clearLanguageHook(); if (languageHook) languageHook->delayedCallClose(); } + + inline LanguageHook* getLanguageHook() { return languageHook; } }; class SetLanguageHookGuard diff --git a/xbmc/interfaces/python/LanguageHook.cpp b/xbmc/interfaces/python/LanguageHook.cpp index 37716a0f37..4256808fcd 100644 --- a/xbmc/interfaces/python/LanguageHook.cpp +++ b/xbmc/interfaces/python/LanguageHook.cpp @@ -45,10 +45,15 @@ namespace XBMCAddon int value; }; + void LanguageHook::makePendingCalls() + { + PythonCallbackHandler::makePendingCalls(); + } + void LanguageHook::delayedCallOpen() { TRACE; - PythonCallbackHandler::makePendingCalls(); + // TODO: add a check for null of _save. If it's not null there's // a problem. @@ -101,7 +106,6 @@ namespace XBMCAddon tlsCount.set(NULL); delete count; } - PythonCallbackHandler::makePendingCalls(); } LanguageHook* LanguageHook::getInstance() diff --git a/xbmc/interfaces/python/LanguageHook.h b/xbmc/interfaces/python/LanguageHook.h index 8881d11b78..cb07ea4287 100644 --- a/xbmc/interfaces/python/LanguageHook.h +++ b/xbmc/interfaces/python/LanguageHook.h @@ -55,7 +55,8 @@ namespace XBMCAddon virtual void delayedCallOpen(); virtual void delayedCallClose(); - + virtual void makePendingCalls(); + /** * PythonCallbackHandler expects to be instantiated PER AddonClass instance * that is to be used as a callback. This is why this cannot be instantited |