Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python: fix HAS_WEB_SERVER ifdef guard in AddonModuleXbmcwsgi.i #6795

Merged
merged 2 commits into from Mar 31, 2015

Conversation

Montellese
Copy link
Member

This fixes an issue brought up in http://trac.kodi.tv/ticket/15849. The generated python API code for the WSGI module, which can only be used through the webserver, is currently compiled independent of the HAS_WEB_SERVER define because the respective #endif is added before the generated code.

Swig supports "code insertion blocks" (see http://www.swig.org/Doc2.0/SWIGDocumentation.html#SWIG_nn40) to place code from the interface description file into specific places in the generated code. Unfortunately SWIG doesn't support inserting code after the generated code. Therefore I'm using a non-standard insertion code called footer (the opposite of the existing header).

@jimfcarroll: Please let me know if you can think of a better way to do this. Ideally the interface file would never be processed and the problematic code never generated in which case we wouldn't need the ifdef guard in the first place. Unfortuantely we execute codegenerator.mk in bootstrap where we have no clue about any configure flags/options and available libraries etc.

@Montellese Montellese added the Type: Fix non-breaking change which fixes an issue label Mar 23, 2015
@Montellese
Copy link
Member Author

jenkins build this please

@herrnst
Copy link
Member

herrnst commented Mar 26, 2015

Tested --disable-webserver with this applied after pinging you on IRC, can confirm this fixes compile.

@Montellese Montellese added this to the Isengard 15.0-alpha2 milestone Mar 31, 2015
@Montellese Montellese self-assigned this Mar 31, 2015
Montellese added a commit that referenced this pull request Mar 31, 2015
python: fix HAS_WEB_SERVER ifdef guard in AddonModuleXbmcwsgi.i
@Montellese Montellese merged commit 3f01fb6 into xbmc:master Mar 31, 2015
@Montellese Montellese deleted the codegenerator_fix_wsgi branch March 31, 2015 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Fix non-breaking change which fixes an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants