diff options
| author | Chong Yidong | 2012-09-23 17:16:57 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-09-23 17:16:57 +0800 |
| commit | d07ff9db920196077333148f6db88525c8ba3151 (patch) | |
| tree | 728ab8cebaa9efbfaa79b6076374435727d47db2 /src/w32.c | |
| parent | 4d7e6e51dd4acecff466a28d958c50f34fc130b8 (diff) | |
| download | emacs-d07ff9db920196077333148f6db88525c8ba3151.tar.gz emacs-d07ff9db920196077333148f6db88525c8ba3151.zip | |
Remove LIBRARIES arg from w32_delayed_load and friends.
These always use Vdynamic_library_alist anyway.
* src/image.c (Finit_image_library, lookup_image_type)
(define_image_type): Remove now-unneeded second arg.
(init_xpm_functions, init_png_functions, init_jpeg_functions)
(init_tiff_functions, init_gif_functions, init_svg_functions):
Arglist and w32_delayed_load calling convention changed.
(gs_type): Remove init_gs_functions; there is no such function.
* src/gnutls.c (init_gnutls_functions): Caller changed; remove arg.
(Fgnutls_available_p): Caller changed.
* src/xml.c (init_libxml2_functions, Flibxml_parse_html_region)
(Flibxml_parse_xml_region): Likewise.
* src/dispextern.h (struct image_type): Remove arg from init function.
* src/w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
Vdynamic_library_alist.
* lisp/image.el (image-type-available-p): Change caller to
init-image-library.
Diffstat (limited to 'src/w32.c')
| -rw-r--r-- | src/w32.c | 28 |
1 files changed, 13 insertions, 15 deletions
| @@ -6525,29 +6525,27 @@ sys_localtime (const time_t *t) | |||
| 6525 | 6525 | ||
| 6526 | Lisp_Object Vlibrary_cache; | 6526 | Lisp_Object Vlibrary_cache; |
| 6527 | 6527 | ||
| 6528 | /* The argument LIBRARIES is an alist that associates a symbol | 6528 | /* Try loading LIBRARY_ID from the file(s) specified in |
| 6529 | LIBRARY_ID, identifying an external DLL library known to Emacs, to | 6529 | Vdynamic_library_alist. If the library is loaded successfully, |
| 6530 | a list of filenames under which the library is usually found. In | 6530 | return the handle of the DLL, and record the filename in the |
| 6531 | most cases, the argument passed as LIBRARIES is the variable | 6531 | property :loaded-from of LIBRARY_ID. If the library could not be |
| 6532 | `dynamic-library-alist', which is initialized to a list of common | 6532 | found, or when it was already loaded (because the handle is not |
| 6533 | library names. If the function loads the library successfully, it | 6533 | recorded anywhere, and so is lost after use), return NULL. |
| 6534 | returns the handle of the DLL, and records the filename in the | 6534 | |
| 6535 | property :loaded-from of LIBRARY_ID; it returns NULL if the library | 6535 | We could also save the handle in :loaded-from, but currently |
| 6536 | could not be found, or when it was already loaded (because the | 6536 | there's no use case for it. */ |
| 6537 | handle is not recorded anywhere, and so is lost after use). It | ||
| 6538 | would be trivial to save the handle too in :loaded-from, but | ||
| 6539 | currently there's no use case for it. */ | ||
| 6540 | HMODULE | 6537 | HMODULE |
| 6541 | w32_delayed_load (Lisp_Object libraries, Lisp_Object library_id) | 6538 | w32_delayed_load (Lisp_Object library_id) |
| 6542 | { | 6539 | { |
| 6543 | HMODULE library_dll = NULL; | 6540 | HMODULE library_dll = NULL; |
| 6544 | 6541 | ||
| 6545 | CHECK_SYMBOL (library_id); | 6542 | CHECK_SYMBOL (library_id); |
| 6546 | 6543 | ||
| 6547 | if (CONSP (libraries) && NILP (Fassq (library_id, Vlibrary_cache))) | 6544 | if (CONSP (Vdynamic_library_alist) |
| 6545 | && NILP (Fassq (library_id, Vlibrary_cache))) | ||
| 6548 | { | 6546 | { |
| 6549 | Lisp_Object found = Qnil; | 6547 | Lisp_Object found = Qnil; |
| 6550 | Lisp_Object dlls = Fassq (library_id, libraries); | 6548 | Lisp_Object dlls = Fassq (library_id, Vdynamic_library_alist); |
| 6551 | 6549 | ||
| 6552 | if (CONSP (dlls)) | 6550 | if (CONSP (dlls)) |
| 6553 | for (dlls = XCDR (dlls); CONSP (dlls); dlls = XCDR (dlls)) | 6551 | for (dlls = XCDR (dlls); CONSP (dlls); dlls = XCDR (dlls)) |