Kodi Community Forum
For the developer in charge of SWIG. - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: For the developer in charge of SWIG. (/showthread.php?tid=159451)

Pages: 1 2


RE: For the developer in charge of SWIG. - Nuka1195 - 2013-04-17

I reread your message.


RE: For the developer in charge of SWIG. - jfcarroll - 2013-04-17

Nuka, Sorry about the (int) cast. That's a bug in the template. I'll fix it and check it in. It's a bug fix so it should be ok.


RE: For the developer in charge of SWIG. - jfcarroll - 2013-04-17

Ok. If you rebase on top of master (git pull --rebase xbmc master), the constant addition should work now.


RE: For the developer in charge of SWIG. - Nuka1195 - 2013-04-17

thank you


RE: For the developer in charge of SWIG. - Nuka1195 - 2013-05-16

example:
PHP Code:
String numeric(int type, const Stringheading, const Stringdefaultt emptyString); 

Is there any way in the swig template to change defaultt -> default for the keywords?

defaultt is a really bad name. default does seem appropriate for the keyword unless you could think of another keyword that would be better.


RE: For the developer in charge of SWIG. - Nuka1195 - 2013-05-17

May be hacky, but is better than 'defaultt' as a keyword.

PHP Code:
diff --git a/xbmc/interfaces/python/PythonSwig.cpp.template b/xbmc/interfaces/python/PythonSwig.cpp.template
index 2ad6c77
..c0b3e9b 100644
--- a/xbmc/interfaces/python/PythonSwig.cpp.template
+++ b/xbmc/interfaces/python/PythonSwig.cpp.template
@@ -137,+137,@@ void doMethod(methodMethodType methodType)
       if (
useKeywordParsing && !doAsMappingIndex)
       { %>
     static const 
char *keywords[] = {<%
-          
params.each { %>
-          
"${it.@name}",<% } %>
+          
params.each {
+          
String kword it.@name.replace("defaultt""default") %>
+          
"${kword}",<% } %>
           
NULL};
 <%    }
       
params.each 



RE: For the developer in charge of SWIG. - jmarshall - 2013-06-02

@Nuka1195: Mind throwing that hacky fix up as a PR and ping @jimfcarroll?


RE: For the developer in charge of SWIG. - Martijn - 2013-06-02

(2013-06-02, 04:20)jmarshall Wrote: @Nuka1195: Mind throwing that hacky fix up as a PR and ping @jimfcarroll?

It's already there https://github.com/xbmc/xbmc/pull/2767