commit-gnue
[Top][All Lists]
Advanced

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

gnue/geas/src/methods methods_python.c


From: Neil Tiffin
Subject: gnue/geas/src/methods methods_python.c
Date: Sun, 16 Sep 2001 10:53:09 -0400

CVSROOT:        /home/cvs
Module name:    gnue
Changes by:     Neil Tiffin <address@hidden>    01/09/16 10:53:09

Modified files:
        geas/src/methods: methods_python.c 

Log message:
        Fix Python methods for Mac.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/src/methods/methods_python.c.diff?cvsroot=OldCVS&tr1=1.5&tr2=1.6&r1=text&r2=text

Patches:
Index: gnue/geas/src/methods/methods_python.c
diff -u gnue/geas/src/methods/methods_python.c:1.5 
gnue/geas/src/methods/methods_python.c:1.6
--- gnue/geas/src/methods/methods_python.c:1.5  Sat Sep 15 20:37:46 2001
+++ gnue/geas/src/methods/methods_python.c      Sun Sep 16 10:53:09 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.5 2001/09/16 00:37:46 ntiffin Exp $
+  $Id: methods_python.c,v 1.6 2001/09/16 14:53:09 ntiffin Exp $
 */
 
 /*
@@ -129,7 +129,7 @@
 python_init_method_handling(configuration config)
 {
   char *buf = NULL;
-  PyObject *m
+  PyObject *m;
   PyObject *py_dict;
 
   g_return_val_if_fail (config, FALSE);
@@ -236,7 +236,7 @@
   while (dirname[strlen (dirname) - 1] == '\\' ||
          dirname[strlen (dirname) - 1] == '/')
     dirname[strlen (dirname) - 1] = '\0';
-  /* message( "method dir name: '%s'" , dirname ); */
+  message( "method dir name: '%s'" , dirname );
 
   /* execute each .py file */
   dir = opendir (dirname);
@@ -466,8 +466,9 @@
 load_python_binding(configuration config)
 {
   gpointer gsym;
+  char *option_string;
   CORBA_to_Python_func = NULL;
-
+  
   g_assert (config);
 
   if (!g_module_supported ())
@@ -475,26 +476,31 @@
       errormsg ("glib dynamic module loading is not supported.");
       return (ERR_NO_GMODULE);
     }
+  option_string = get_global_option_str(config, "ORBit-python", 
ORBIT_PYTHON_SO);
+  orbit_python_library = g_module_open (option_string, G_MODULE_BIND_LAZY);
 
-  orbit_python_library =
-    g_module_open (get_global_option_str
-                   (config, "ORBit-python", ORBIT_PYTHON_SO),
-                   G_MODULE_BIND_LAZY);
-
   if (!orbit_python_library)
     {
-      errormsg ("Could not load ORBit-Python module.");
+      errormsg ("Could not load ORBit-Python module at: ");
+      errormsg (option_string);
       return (ERR_NO_ORBIT_PYTHON);
     }
 
   g_module_symbol (orbit_python_library, "CORBA_Object_to_PyObject", &gsym);
   CORBA_to_Python_func = gsym;
+  
+#ifdef __APPLE__
+#ifdef __ppc__
+  /* TODO i wonder if this will work for linux stuff */
+  g_module_close(orbit_python_library);
+#endif
+#endif
 
   if (!CORBA_to_Python_func)
     {
       errormsg ("Could not locate required functions");
       return (ERR_NO_FUNCTIONS);
     }
-
+  
   return (ERR_OK);
 }



reply via email to

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