changeset 1811:3fe1a35b705d

[xemacs-hg @ 2003-11-29 22:11:47 by james] Several module-related cleanups.
author james
date Sat, 29 Nov 2003 22:11:49 +0000
parents 6f8003dda838
children 0422b2e4ee14
files src/ChangeLog src/emodules.c src/sysdll.c src/sysdll.h src/ui-gtk.c
diffstat 5 files changed, 18 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Nov 28 22:50:32 2003 +0000
+++ b/src/ChangeLog	Sat Nov 29 22:11:49 2003 +0000
@@ -1,3 +1,11 @@
+2003-11-29  Jerry James  <james@xemacs.org>
+
+	* emodules.c (emodules_load): Remove dll_error parameter.
+	* sysdll.c: Ditto.
+	* sysdll.h: Ditto.  Remove unused DLLEXPORT definitions.
+	* ui-gtk.c (initialize_dll_cache): dll_open now takes a Lisp_Object.
+	* ui-gtk.c (Fdll_load): Ditto.  Remove dll_error parameter.
+
 2003-11-18  Jerry James  <james@xemacs.org>
 
 	* config.h.in: Add TYPEOF.
--- a/src/emodules.c	Fri Nov 28 22:50:32 2003 +0000
+++ b/src/emodules.c	Sat Nov 29 22:11:49 2003 +0000
@@ -368,8 +368,7 @@
   dlhandle = dll_open (foundname);
   if (dlhandle == NULL)
     {
-      signal_error (Qdll_error, "Opening dynamic module",
-		    dll_error (dlhandle));
+      signal_error (Qdll_error, "Opening dynamic module", dll_error ());
     }
 
   ellcc_rev = (const long *)dll_variable (dlhandle, "emodule_compiler");
--- a/src/sysdll.c	Fri Nov 28 22:50:32 2003 +0000
+++ b/src/sysdll.c	Sat Nov 29 22:11:49 2003 +0000
@@ -105,7 +105,7 @@
 }
 
 Lisp_Object
-dll_error (dll_handle h)
+dll_error ()
 {
   const Extbyte *msg;
 #if defined(HAVE_DLERROR) || defined(dlerror)
@@ -172,7 +172,7 @@
 }
 
 Lisp_Object
-dll_error (dll_handle h)
+dll_error ()
 {
   /* #### WTF?!  Shouldn't this at least attempt to get strerror or
      something?  --hniksic */
@@ -225,7 +225,7 @@
 }
 
 Lisp_Object
-dll_error (dll_handle h)
+dll_error ()
 {
   CIbyte err[32];
   snprintf (err, 32, "Windows DLL Error %lu", GetLastError ());
@@ -298,7 +298,7 @@
 }
 
 Lisp_Object
-dll_error (dll_handle h)
+dll_error ()
 {
   NSLinkEditErrors c;
   int errorNumber;
@@ -339,7 +339,7 @@
 }
 
 Lisp_Object
-dll_error (dll_handle h)
+dll_error ()
 {
   return build_string ("Shared libraries not implemented on this system");
 }
--- a/src/sysdll.h	Fri Nov 28 22:50:32 2003 +0000
+++ b/src/sysdll.h	Sat Nov 29 22:11:49 2003 +0000
@@ -24,14 +24,6 @@
 
 BEGIN_C_DECLS
 
-#if defined(WIN32_NATIVE)
-#define DLLEXPORT __declspec(dllexport)
-#elif defined(WIN16)
-#define DLLEXPORT FAR PASCAL _EXPORT
-#else
-#define DLLEXPORT
-#endif
-
 typedef void * dll_handle;
 typedef void * dll_func;
 typedef void * dll_var;
@@ -42,7 +34,7 @@
 extern int dll_close(dll_handle);
 extern dll_func dll_function(dll_handle, const CIbyte *);
 extern dll_var dll_variable(dll_handle, const CIbyte *);
-extern Lisp_Object dll_error(dll_handle);
+extern Lisp_Object dll_error(void);
 
 /* More stand-ins ... */
 
--- a/src/ui-gtk.c	Fri Nov 28 22:50:32 2003 +0000
+++ b/src/ui-gtk.c	Sat Nov 29 22:11:49 2003 +0000
@@ -54,7 +54,7 @@
     {
       dll_cache = g_hash_table_new (g_str_hash, g_str_equal);
 
-      g_hash_table_insert (dll_cache, "---XEmacs Internal Handle---", dll_open (NULL));
+      g_hash_table_insert (dll_cache, "---XEmacs Internal Handle---", dll_open (Qnil));
     }
 }
 
@@ -80,7 +80,7 @@
 
   if (!h)
     {
-      h = dll_open ((char *) XSTRING_DATA (dll));
+      h = dll_open (dll);
 
       if (h)
 	{
@@ -89,7 +89,7 @@
       else
 	{
 	  signal_error (Qfile_error,
-			     "dll_open error", build_string (dll_error (NULL)));
+			"dll_open error", build_string (dll_error ()));
 	}
     }
   return (h ? Qt : Qnil);