[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/geas/src/methods methods_glibmodule.c meth...
From: |
Neil Tiffin |
Subject: |
gnue/geas/src/methods methods_glibmodule.c meth... |
Date: |
Sun, 16 Sep 2001 14:42:24 -0400 |
CVSROOT: /home/cvs
Module name: gnue
Changes by: Neil Tiffin <address@hidden> 01/09/16 14:42:23
Modified files:
geas/src/methods: methods_glibmodule.c methods_python.c
Log message:
Add ifdefs for compiling only specificed method support.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/src/methods/methods_glibmodule.c.diff?cvsroot=OldCVS&tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/src/methods/methods_python.c.diff?cvsroot=OldCVS&tr1=1.7&tr2=1.8&r1=text&r2=text
Patches:
Index: gnue/geas/src/methods/methods_glibmodule.c
diff -u gnue/geas/src/methods/methods_glibmodule.c:1.2
gnue/geas/src/methods/methods_glibmodule.c:1.3
--- gnue/geas/src/methods/methods_glibmodule.c:1.2 Fri Sep 14 21:47:25 2001
+++ gnue/geas/src/methods/methods_glibmodule.c Sun Sep 16 14:42:23 2001
@@ -19,7 +19,7 @@
along with GEAS; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- $Id: methods_glibmodule.c,v 1.2 2001/09/15 01:47:25 ntiffin Exp $
+ $Id: methods_glibmodule.c,v 1.3 2001/09/16 18:42:23 ntiffin Exp $
*/
#include "config.h"
@@ -36,9 +36,10 @@
#include "methods.h"
#include "exceptions.h"
-
#include "methods_glibmodule.h"
+#if USE_GLIBMODULE_METHODS
+
typedef char *(*METHODFUNC) (GEAS_DataObject obj, GEAS_Arguments * args,
GEAS_Connection server, CORBA_Environment * ev);
@@ -261,3 +262,46 @@
classname, methodname);
return (NULL);
}
+
+#else
+
+// place holder functions in case gmodule methods not compiled in
+
+/* ------------------------------------------------------------------------- *\
+ * glibmodule_initialise_method_handling
+\* ------------------------------------------------------------------------- */
+gboolean gmod_init_method_handling(configuration config)
+{
+ return FALSE;
+}
+
+
+/* ------------------------------------------------------------------------- *\
+ * glibmodule_load_method_handlers
+\* ------------------------------------------------------------------------- */
+gboolean glibmodule_load_method_handlers (configuration config)
+{
+ return FALSE;
+}
+
+
+/* ------------------------------------------------------------------------- *\
+ * glibmodule_shutdown_method_handling
+\* ------------------------------------------------------------------------- */
+gboolean glibmodule_shutdown_method_handling (void)
+{
+ return FALSE;
+}
+
+
+/* ------------------------------------------------------------------------- *\
+ * glibmodule_execute_method
+\* ------------------------------------------------------------------------- */
+CORBA_char * glibmodule_execute_method (GEAS_object_reference * obj,
+ const char *methodname, GEAS_Arguments * args,
+ CORBA_Environment * ev)
+{
+ return NULL;
+}
+
+#endif
Index: gnue/geas/src/methods/methods_python.c
diff -u gnue/geas/src/methods/methods_python.c:1.7
gnue/geas/src/methods/methods_python.c:1.8
--- gnue/geas/src/methods/methods_python.c:1.7 Sun Sep 16 11:07:49 2001
+++ gnue/geas/src/methods/methods_python.c Sun Sep 16 14:42:23 2001
@@ -19,7 +19,7 @@
along with GEAS; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- $Id: methods_python.c,v 1.7 2001/09/16 15:07:49 ntiffin Exp $
+ $Id: methods_python.c,v 1.8 2001/09/16 18:42:23 ntiffin Exp $
*/
/*
@@ -28,12 +28,6 @@
minimal system to start writing useable code
*/
-/*
-#ifndef USE_UNSTABLE_METHODS
-#error "USE_UNSTABLE_METHODS was not defined."
-#endif
-*/
-
#include "config.h"
#include <glib.h>
#include <stdio.h>
@@ -41,7 +35,6 @@
#include <stdlib.h>
#include <gmodule.h>
#include <dirent.h>
-#include <Python.h>
#include "geas-server.h"
#include "classdata.h"
@@ -49,6 +42,10 @@
#include "methods.h"
#include "exceptions.h"
+#include "methods_python.h"
+
+#if USE_PYTHON_METHODS
+
#define DEFAULT_IDL_FILE "geas.idl"
#define DEFAULT_METHOD_DIR "../examples/businessobjects/methods"
#define ORBIT_PYTHON_SO "/usr/lib/python1.5/site-packages/CORBAmodule.so"
@@ -59,7 +56,7 @@
#define ERR_NO_FUNCTIONS (-3)
#define ERR_MEMORY (-4)
-#include "methods_python.h"
+#include <Python.h>
static GList *provider_list = NULL;
static PyThreadState *mainThreadState = NULL;
@@ -393,7 +390,7 @@
}
if (function != 0)
{
- int i;
+ unsigned int i;
/* lock python interpreter in case it's needed */
PyEval_AcquireLock ();
@@ -466,7 +463,7 @@
load_python_binding(configuration config)
{
gpointer gsym;
- char *option_string;
+ gchar *option_string;
CORBA_to_Python_func = NULL;
g_assert (config);
@@ -503,3 +500,46 @@
}
return (ERR_OK);
}
+
+#else
+
+// function place holders if python is not selected for methods
+
+/* ------------------------------------------------------------------------- *\
+ * python_initialise_method_handling
+\* ------------------------------------------------------------------------- */
+gboolean python_init_method_handling(configuration config)
+{
+ return FALSE;
+}
+
+
+/* ------------------------------------------------------------------------- *\
+ * python_load_method_handlers
+\* ------------------------------------------------------------------------- */
+gboolean python_load_method_handlers (configuration config)
+{
+ return FALSE;
+}
+
+
+/* ------------------------------------------------------------------------- *\
+ * python_shutdown_method_handling
+\* ------------------------------------------------------------------------- */
+gboolean python_shutdown_method_handling (void)
+{
+ return FALSE;
+}
+
+
+/* ------------------------------------------------------------------------- *\
+ * python_execute_method
+\* ------------------------------------------------------------------------- */
+CORBA_char * python_execute_method (GEAS_object_reference * obj,
+ const char *methodname, GEAS_Arguments * args,
+ CORBA_Environment * ev)
+{
+ return NULL;
+}
+
+#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/geas/src/methods methods_glibmodule.c meth...,
Neil Tiffin <=