chiark
/
gitweb
/
~mdw
/
clg
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4be970b
)
Bug fix
author
espen
<espen>
Wed, 6 Sep 2006 10:15:34 +0000
(10:15 +0000)
committer
espen
<espen>
Wed, 6 Sep 2006 10:15:34 +0000
(10:15 +0000)
gffi/basic-types.lisp
patch
|
blob
|
blame
|
history
diff --git
a/gffi/basic-types.lisp
b/gffi/basic-types.lisp
index b2b0a893bde9131b9b8b2fb4020e2989c98167c0..b21fbd3adf99e01058fb8cf2f85138c22507c8d5 100644
(file)
--- a/
gffi/basic-types.lisp
+++ b/
gffi/basic-types.lisp
@@
-20,7
+20,7
@@
;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-;; $Id: basic-types.lisp,v 1.
3 2006-09-06 09:45:26
espen Exp $
+;; $Id: basic-types.lisp,v 1.
4 2006-09-06 10:15:34
espen Exp $
(in-package "GFFI")
(in-package "GFFI")
@@
-570,6
+570,7
@@
(define-type-method reader-function ((type base-char) &key ref (inlined t))
;;; String
(defun utf8-length (string)
;;; String
(defun utf8-length (string)
+ "Returns the length including the trailing zero, of STRING encoded as UTF8"
(1+ (loop
for char across string
as char-code = (char-code char)
(1+ (loop
for char across string
as char-code = (char-code char)
@@
-601,7
+602,7
@@
(defun encode-utf8-string (string &optional location)
((< char-code #x800) (encode 11))
((< char-code #x10000) (encode 16))
((< char-code #x200000) (encode 21)))))
((< char-code #x800) (encode 11))
((< char-code #x10000) (encode 16))
((< char-code #x200000) (encode 21)))))
- (setf (ref-byte location
len
) 0)
+ (setf (ref-byte location
(1- len)
) 0)
location))
(defun decode-utf8-string (c-string)
location))
(defun decode-utf8-string (c-string)