diff options
author | Jim Carroll <thecarrolls@jiminger.com> | 2012-11-11 19:00:32 -0500 |
---|---|---|
committer | Jim Carroll <thecarrolls@jiminger.com> | 2012-11-11 19:00:32 -0500 |
commit | 389c369d82ecc32137134a9ce950b69e5783c9bc (patch) | |
tree | 36ea97f87f565f3ffb6b137b7cb0be3bb5a20db8 | |
parent | ec413440dcbaf40ca568934263946a55a58952f4 (diff) |
[fix] closes #13507. This adds the ablity to use operator[] and size() methods on AddonClasses.
-rw-r--r-- | xbmc/interfaces/python/PythonSwig.cpp.template | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xbmc/interfaces/python/PythonSwig.cpp.template b/xbmc/interfaces/python/PythonSwig.cpp.template index ecdd2dee87..f20516a4d2 100644 --- a/xbmc/interfaces/python/PythonSwig.cpp.template +++ b/xbmc/interfaces/python/PythonSwig.cpp.template @@ -422,6 +422,10 @@ void doClassMethodInfo(Node clazz, List initTypeCalls = null) Py${classNameAsVariable}_Type.tp_doc = ${Helper.hasDoc(clazz) ? (classNameAsVariable + '__doc__') : 'NULL' }; Py${classNameAsVariable}_Type.tp_methods = ${classNameAsVariable}_methods; <% + if (doAsMapping) + { +%> Py${classNameAsVariable}_Type.tp_as_mapping = &${module.@name}_${classNameAsVariable}_as_mapping; +<% } Node baseclass = PythonTools.findValidBaseClass(clazz, module) %> Py${classNameAsVariable}_Type.tp_base = ${baseclass ? ('&Py' + PythonTools.getClassNameAsVariable(baseclass) + '_Type') : "NULL"}; |