commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/geas/src Makefile.am methods/methods.c met...


From: Reinhard Mueller
Subject: gnue/geas/src Makefile.am methods/methods.c met...
Date: Tue, 21 Aug 2001 14:20:24 -0700

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Reinhard Mueller <address@hidden>       01/08/21 14:20:24

Modified files:
        geas/src       : Makefile.am 
        geas/src/methods: methods.c methods_unstable.h 

Log message:
        Tried to fix python methods code. Doesn't work yet.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/geas/src/Makefile.am.diff?tr1=1.40&tr2=1.41&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/geas/src/methods/methods.c.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/geas/src/methods/methods_unstable.h.diff?tr1=1.8&tr2=1.9&r1=text&r2=text

Patches:
Index: gnue/geas/src/Makefile.am
diff -u gnue/geas/src/Makefile.am:1.40 gnue/geas/src/Makefile.am:1.41
--- gnue/geas/src/Makefile.am:1.40      Wed Jul 25 12:57:05 2001
+++ gnue/geas/src/Makefile.am   Tue Aug 21 14:20:24 2001
@@ -1,4 +1,4 @@
-## $Id: Makefile.am,v 1.40 2001/07/25 19:57:05 reinhard Exp $
+## $Id: Makefile.am,v 1.41 2001/08/21 21:20:24 reinhard Exp $
 
 SUBDIRS        = config objectstore oql objectcache methods datamonitor
 
@@ -9,8 +9,8 @@
 # temporary, really - just while the python interpreter is in GEAS
 # PYTHON_CFLAGS= $(PYTHON_INCLUDES)
 # PYTHON_LIBS= -lpython1.5
-PYTHON_CFLAGS= -DNO_USE_PYTHON
-PYTHON_LIBS= 
+# PYTHON_CFLAGS= -DNO_USE_PYTHON
+# PYTHON_LIBS= 
 
 MODULES = $(top_builddir)/src/config/libconfig.a \
           $(top_builddir)/src/oql/liboql.a \
Index: gnue/geas/src/methods/methods.c
diff -u gnue/geas/src/methods/methods.c:1.10 
gnue/geas/src/methods/methods.c:1.11
--- gnue/geas/src/methods/methods.c:1.10        Fri Jun  8 15:47:46 2001
+++ gnue/geas/src/methods/methods.c     Tue Aug 21 14:20:24 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.c,v 1.10 2001/06/08 22:47:46 baumannd Exp $
+  $Id: methods.c,v 1.11 2001/08/21 21:20:24 reinhard Exp $
 */
 
 #include "config.h"
@@ -57,7 +57,7 @@
 #if USE_OAF
 /* use the OAF technique for locating objects */
 #include "methods_oaf.h"
-#elif USE_UNSTABLE_METHODS
+#elif USE_PYTHON_METHODS
 /* use a somewhat unreliable fallback technique */
 #include "methods_unstable.h"
 #elif USE_GLIBMODULE_METHODS
Index: gnue/geas/src/methods/methods_unstable.h
diff -u gnue/geas/src/methods/methods_unstable.h:1.8 
gnue/geas/src/methods/methods_unstable.h:1.9
--- gnue/geas/src/methods/methods_unstable.h:1.8        Fri Jun  8 15:47:46 2001
+++ gnue/geas/src/methods/methods_unstable.h    Tue Aug 21 14:20:24 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_unstable.h,v 1.8 2001/06/08 22:47:46 baumannd Exp $
+  $Id: methods_unstable.h,v 1.9 2001/08/21 21:20:24 reinhard Exp $
 */
 
 /*
@@ -28,12 +28,15 @@
   minimal system to start writing useable code
 */
 
+/*
 #ifndef USE_UNSTABLE_METHODS
 #error "USE_UNSTABLE_METHODS was not defined."
 #endif
+*/
 
 #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"
 
 #define ERR_OK              (0)
 #define ERR_NO_GMODULE      (-1)
@@ -66,7 +69,7 @@
   PyObject *function;
   char *methodname;
 
-  g_assert (self);
+/*  g_assert (self); */
   g_assert (args);
 
   if (!PyArg_ParseTuple
@@ -145,7 +148,7 @@
 
   /* python header/initialisation code */
   buf =
-    g_strdup_printf ("CORBA.load_idl(\"%s\")",
+    g_strdup_printf ("CORBA._load_idl(\"%s\")",
                      get_global_option_str (config, "rootIDLfile",
                                             DEFAULT_IDL_FILE));
   if (!buf)
@@ -170,6 +173,8 @@
   mainInterpreterState = mainThreadState->interp;
   py_threadstate = PyThreadState_New (mainInterpreterState);
   PyEval_ReleaseLock ();
+  
+  return (TRUE);
 }
 
 gboolean
@@ -213,7 +218,7 @@
     }
   while ((entry = readdir (dir)) != NULL)
     {
-      if (is_extension (entry->d_name, "py"))
+      if (!strcmp (&entry->d_name[strlen (entry->d_name) - 3], ".py"))
         {
           name = g_strdup_printf ("%s/%s", dirname, entry->d_name);
           if (!name)
@@ -286,6 +291,8 @@
 
   PyThreadState_Swap (NULL);
   PyEval_ReleaseLock ();
+
+  return (TRUE);
 }
 
 gboolean
@@ -315,7 +322,7 @@
 
   obj2 =
     make_dataobject_reference (obj->classname, obj->objectid, obj->username,
-                               ev);
+                               obj->sessionid, ev);
   if (ev->_major != CORBA_NO_EXCEPTION)
     /* didn't work */
     return (NULL);
@@ -333,6 +340,8 @@
   list = provider_list;
   while (list)
     {
+      g_message ("%s = %s", ((provider_t *) list->data)->classname, 
obj->classname);
+      g_message ("%s = %s", ((provider_t *) list->data)->methodname, 
methodname);
       if (!g_strcasecmp
           (((provider_t *) list->data)->classname, obj->classname)
           && !g_strcasecmp (((provider_t *) list->data)->methodname,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]