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:
1ce06bb
)
Renamed VECTOR-NULL to NULL-TERMINATED-VECTOR
author
espen
<espen>
Mon, 14 Feb 2005 00:44:26 +0000
(
00:44
+0000)
committer
espen
<espen>
Mon, 14 Feb 2005 00:44:26 +0000
(
00:44
+0000)
glib/gboxed.lisp
patch
|
blob
|
blame
|
history
glib/glib.lisp
patch
|
blob
|
blame
|
history
diff --git
a/glib/gboxed.lisp
b/glib/gboxed.lisp
index e6e8e8fe4cc00c9e75715ce17a283e7656e0d4a9..4b36115a9f46d25690f842caf6ba527bfd0ad866 100644
(file)
--- a/
glib/gboxed.lisp
+++ b/
glib/gboxed.lisp
@@
-15,7
+15,7
@@
;; License along with this library; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
;; License along with this library; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-;; $Id: gboxed.lisp,v 1.1
5 2005/02/09 22:59:03
espen Exp $
+;; $Id: gboxed.lisp,v 1.1
6 2005/02/14 00:44:26
espen Exp $
(in-package "GLIB")
(in-package "GLIB")
@@
-112,7
+112,7
@@
(register-derivable-type 'boxed "GBoxed" 'expand-boxed-type)
-;;;;
Zero
terminated vector of strings
+;;;;
NULL
terminated vector of strings
-(deftype strings () '(
vector-null
string))
+(deftype strings () '(
null-terminated-vector
string))
(register-type 'strings "GStrv")
(register-type 'strings "GStrv")
diff --git
a/glib/glib.lisp
b/glib/glib.lisp
index 05df2b0d07828ce007895ca09596a1dda67d7efc..630d3aeda5f9b5a775891ea690ff6078008f9830 100644
(file)
--- a/
glib/glib.lisp
+++ b/
glib/glib.lisp
@@
-15,7
+15,7
@@
;; License along with this library; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
;; License along with this library; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-;; $Id: glib.lisp,v 1.2
6 2005/02/10 00:12:04
espen Exp $
+;; $Id: glib.lisp,v 1.2
7 2005/02/14 00:44:26
espen Exp $
(in-package "GLIB")
(in-package "GLIB")
@@
-548,17
+548,17
@@
(defun destroy-0-vector (location element-type)
(deallocate-memory location))
(deallocate-memory location))
-(defmethod alien-type ((type (eql '
vector-null
)) &rest args)
+(defmethod alien-type ((type (eql '
null-terminated-vector
)) &rest args)
(declare (ignore type args))
(alien-type 'pointer))
(declare (ignore type args))
(alien-type 'pointer))
-(defmethod size-of ((type (eql '
vector-null
)) &rest args)
+(defmethod size-of ((type (eql '
null-terminated-vector
)) &rest args)
(declare (ignore type args))
(alien-type 'pointer))
(declare (ignore type args))
(alien-type 'pointer))
-(defmethod writer-function ((type (eql '
vector-null
)) &rest args)
+(defmethod writer-function ((type (eql '
null-terminated-vector
)) &rest args)
(declare (ignore type))
(declare (ignore type))
- (destructuring-bind (element-type
&optional (length '*)
) args
+ (destructuring-bind (element-type) args
(unless (eq (alien-type element-type) (alien-type 'pointer))
(error "Elements in null-terminated vectors need to be of pointer types"))
#'(lambda (vector location &optional (offset 0))
(unless (eq (alien-type element-type) (alien-type 'pointer))
(error "Elements in null-terminated vectors need to be of pointer types"))
#'(lambda (vector location &optional (offset 0))
@@
-566,9
+566,9
@@
(defmethod writer-function ((type (eql 'vector-null)) &rest args)
(sap-ref-sap location offset)
(make-0-vector element-type vector)))))
(sap-ref-sap location offset)
(make-0-vector element-type vector)))))
-(defmethod reader-function ((type (eql '
vector-null
)) &rest args)
+(defmethod reader-function ((type (eql '
null-terminated-vector
)) &rest args)
(declare (ignore type))
(declare (ignore type))
- (destructuring-bind (element-type
&optional (length '*)
) args
+ (destructuring-bind (element-type) args
(unless (eq (alien-type element-type) (alien-type 'pointer))
(error "Elements in null-terminated vectors need to be of pointer types"))
#'(lambda (location &optional (offset 0))
(unless (eq (alien-type element-type) (alien-type 'pointer))
(error "Elements in null-terminated vectors need to be of pointer types"))
#'(lambda (location &optional (offset 0))
@@
-576,17
+576,17
@@
(defmethod reader-function ((type (eql 'vector-null)) &rest args)
(map-0-vector 'vector #'identity (sap-ref-sap location offset)
element-type)))))
(map-0-vector 'vector #'identity (sap-ref-sap location offset)
element-type)))))
-(defmethod destroy-function ((type (eql '
vector-null
)) &rest args)
+(defmethod destroy-function ((type (eql '
null-terminated-vector
)) &rest args)
(declare (ignore type))
(declare (ignore type))
- (destructuring-bind (element-type
&optional (length '*)
) args
+ (destructuring-bind (element-type) args
(unless (eq (alien-type element-type) (alien-type 'pointer))
(error "Elements in null-terminated vectors need to be of pointer types"))
#'(lambda (location &optional (offset 0))
(unless (null-pointer-p (sap-ref-sap location offset))
(unless (eq (alien-type element-type) (alien-type 'pointer))
(error "Elements in null-terminated vectors need to be of pointer types"))
#'(lambda (location &optional (offset 0))
(unless (null-pointer-p (sap-ref-sap location offset))
- (destroy-
c
-vector
+ (destroy-
0
-vector
(sap-ref-sap location offset) element-type)
(setf (sap-ref-sap location offset) (make-pointer 0))))))
(sap-ref-sap location offset) element-type)
(setf (sap-ref-sap location offset) (make-pointer 0))))))
-(defmethod unbound-value ((type (eql '
vector-null
)) &rest args)
- (declare (ignore args))
+(defmethod unbound-value ((type (eql '
null-terminated-vector
)) &rest args)
+ (declare (ignore
type
args))
(values t nil))
(values t nil))