r24365 by craig - Rename Python 2.x plugin base name

scribus-commit scribus-commit at lists.scribus.net
Wed Dec 30 10:41:39 UTC 2020


Author: craig
Date: Wed Dec 30 10:41:39 2020
New Revision: 24365

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24365
Log:
Rename Python 2.x plugin base name

Modified:
    trunk/Scribus/scribus/plugins/scriptplugin_py2x/CMakeLists.txt
    trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.cpp
    trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.h

Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24365&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/CMakeLists.txt	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/CMakeLists.txt	Wed Dec 30 10:41:39 2020
@@ -53,7 +53,7 @@
 	svgimport.cpp
 )
 
-set(SCRIBUS_SCRIPTER_PLUGIN "scriptplugin")
+set(SCRIBUS_SCRIPTER_PLUGIN "scriptplugin_py2x")
 
 QT5_WRAP_UI(SCRIPTER_PLUGIN_UI_SOURCES ${SCRIPTER_PLUGIN_UI_SRC} )
 QT5_WRAP_CPP(SCRIPTER_PLUGIN_MOC_SOURCES ${SCRIPTER_PLUGIN_MOC_CLASSES})

Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24365&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.cpp	Wed Dec 30 10:41:39 2020
@@ -90,12 +90,12 @@
 ScripterCore* scripterCore;
 
 
-int scriptplugin_getPluginAPIVersion()
+int scriptplugin_py2x_getPluginAPIVersion()
 {
 	return PLUGIN_API_VERSION;
 }
 
-ScPlugin* scriptplugin_getPlugin()
+ScPlugin* scriptplugin_py2x_getPlugin()
 {
 	scripterCore=nullptr;
 	ScriptPlugin* plug = new ScriptPlugin();
@@ -103,7 +103,7 @@
 	return plug;
 }
 
-void scriptplugin_freePlugin(ScPlugin* plugin)
+void scriptplugin_py2x_freePlugin(ScPlugin* plugin)
 {
 	ScriptPlugin* plug = qobject_cast<ScriptPlugin*>(plugin);
 	Q_ASSERT(plug);
@@ -225,7 +225,7 @@
 /*                                                                                      */
 /****************************************************************************************/
 
-/*static */PyObject *scribus_retval(PyObject* /*self*/, PyObject* args)
+/*static */PyObject *scribus_py2x_retval(PyObject* /*self*/, PyObject* args)
 {
 	char *Name = nullptr;
 	if (!PyArg_ParseTuple(args, (char*) "s", &Name))
@@ -239,7 +239,7 @@
 	return PyInt_FromLong(0L);
 }
 
-/*static */PyObject *scribus_getval(PyObject* /*self*/)
+/*static */PyObject *scribus_py2x_getval(PyObject* /*self*/)
 {
 	return PyString_FromString(scripterCore->inValue.toUtf8().data());
 }
@@ -606,8 +606,8 @@
 	// by Tj (hacker at iam.tj>
 	{const_cast<char*>("combinePolygons"), (PyCFunction)scribus_combinepolygons, METH_NOARGS, tr(scribus_combinepolygons__doc__)},
 	// Internal methods - Not for public use
-	{const_cast<char*>("retval"), (PyCFunction)scribus_retval, METH_VARARGS, const_cast<char*>("Scribus internal.")},
-	{const_cast<char*>("getval"), (PyCFunction)scribus_getval, METH_NOARGS, const_cast<char*>("Scribus internal.")},
+	{const_cast<char*>("retval"), (PyCFunction)scribus_py2x_retval, METH_VARARGS, const_cast<char*>("Scribus internal.")},
+	{const_cast<char*>("getval"), (PyCFunction)scribus_py2x_getval, METH_NOARGS, const_cast<char*>("Scribus internal.")},
 	{const_cast<char*>("setLinkAnnotation"), scribus_setlinkannotation, METH_VARARGS,tr(scribus_setlinkannotation__doc__)},
 	{const_cast<char*>("setFileAnnotation"), (PyCFunction)scribus_setfileannotation, METH_VARARGS|METH_KEYWORDS,tr(scribus_setfileannotation__doc__)},
 	{const_cast<char*>("setURIAnnotation"), scribus_seturiannotation, METH_VARARGS,tr(scribus_seturiannotation__doc__)},

Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24365&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.h
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.h	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.h	Wed Dec 30 10:41:39 2020
@@ -39,12 +39,12 @@
 		QByteArray pythonHome;
 };
 
-extern "C" PLUGIN_API int scriptplugin_getPluginAPIVersion();
-extern "C" PLUGIN_API ScPlugin* scriptplugin_getPlugin();
-extern "C" PLUGIN_API void scriptplugin_freePlugin(ScPlugin* plugin);
+extern "C" PLUGIN_API int scriptplugin_py2x_getPluginAPIVersion();
+extern "C" PLUGIN_API ScPlugin* scriptplugin_py2x_getPlugin();
+extern "C" PLUGIN_API void scriptplugin_py2x_freePlugin(ScPlugin* plugin);
 
 /** Some useful Subroutines */
-/*static */PyObject *scribus_retval(PyObject *self, PyObject* args);
-/*static */PyObject *scribus_getval(PyObject *self);
+/*static */PyObject *scribus_py2x_retval(PyObject *self, PyObject* args);
+/*static */PyObject *scribus_py2x_getval(PyObject *self);
 
 #endif // CMSPLUG_H




More information about the scribus-commit mailing list