summaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2009-11-23 16:51:01 -0200
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-11-24 10:39:25 -0300
commit302029e093c88fb46cea8d6131726b82731110f9 (patch)
treee1eb77ccfd40fdf060599490e3e0af5ed6903a49 /main.cpp
parent04b6a05df40f88e1a62e522fb65264b932a904d5 (diff)
downloadgeneratorrunner-302029e093c88fb46cea8d6131726b82731110f9.tar.gz
generatorrunner-302029e093c88fb46cea8d6131726b82731110f9.tar.xz
generatorrunner-302029e093c88fb46cea8d6131726b82731110f9.zip
Change the getGenerators signature, because on some platforms a function exported as a C function
can't return a C++ type by value. All generators plugins *MUST* be recompiled. Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index af06093..7c69029 100644
--- a/main.cpp
+++ b/main.cpp
@@ -48,7 +48,7 @@ static void printOptions(QTextStream& s, const QMap<QString, QString>& options)
}
}
-typedef QLinkedList<Generator*> (*getGeneratorsFunc)();
+typedef void (*getGeneratorsFunc)(QLinkedList<Generator*>*);
QMap<QString, QString> getCommandLineArgs(int argc, char** argv)
{
@@ -129,7 +129,7 @@ int main(int argc, char *argv[])
QLibrary plugin(generatorFile);
getGeneratorsFunc getGenerators = (getGeneratorsFunc)plugin.resolve("getGenerators");
if (getGenerators)
- generators = getGenerators();
+ getGenerators(&generators);
else {
std::cerr << argv[0] << ": Error loading generatorset plugin: " << qPrintable(plugin.errorString()) << std::endl;
return EXIT_FAILURE;