about summary refs log tree commit diff stats
path: root/src/plugins/python_plugins.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/python_plugins.c')
-rw-r--r--src/plugins/python_plugins.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/plugins/python_plugins.c b/src/plugins/python_plugins.c
index f8f35628..6f7c2158 100644
--- a/src/plugins/python_plugins.c
+++ b/src/plugins/python_plugins.c
@@ -1,7 +1,7 @@
 /*
  * python_plugins.c
  *
- * Copyright (C) 2012 - 2017 James Booth <boothj5@gmail.com>
+ * Copyright (C) 2012 - 2018 James Booth <boothj5@gmail.com>
  *
  * This file is part of Profanity.
  *
@@ -74,11 +74,22 @@ _unref_module(PyObject *module)
 }
 
 const char*
-python_get_version(void)
+python_get_version_string(void)
 {
     return Py_GetVersion();
 }
 
+gchar*
+python_get_version_number(void)
+{
+    const char *version_str = Py_GetVersion();
+    gchar **split = g_strsplit(version_str, " ", 0);
+    gchar *version_number = g_strdup(split[0]);
+    g_strfreev(split);
+
+    return version_number;
+}
+
 void
 python_env_init(void)
 {