zuloloxi / mcl

Automatically exported from code.google.com/p/mcl
Other
0 stars 0 forks source link

Failure to read or set string resources #30

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The get-string and set-string-resource functions in ccl:library;resources.lisp 
have malfunctioned 
since MCL 5.1. The fix is to modify get-string and set-string-resource to work 
with handles.

Original issue reported on code.google.com by terje.norderhaug on 25 Jan 2010 at 3:10

GoogleCodeExporter commented 9 years ago
This patch uploaded as rev 312777eec5 resolves the issue with get-string:

(defun get-string (name-or-number &optional used-file-only? dont-release)
  (let ((str (get-resource "STR " name-or-number used-file-only?)))
    (when str
      (unwind-protect
        (%get-string-from-handle str)
        (unless dont-release (#_ReleaseResource str))))))

Original comment by terje.norderhaug on 25 Jan 2010 at 3:35

GoogleCodeExporter commented 9 years ago
Turns out set-string-resource is not part of MCL. It sets the same file 
resources that get-string retrieves. Let 
me know if you'd like to have it.

Original comment by terje.norderhaug on 25 Jan 2010 at 3:38

GoogleCodeExporter commented 9 years ago

Original comment by terje.norderhaug on 25 Jan 2010 at 3:39