Mercurial > hg > xemacs-beta
comparison src/opaque.h @ 5495:1f0b15040456
Merge.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 01 May 2011 18:44:03 +0100 |
parents | 308d34e9f07d |
children |
comparison
equal
deleted
inserted
replaced
5494:861f2601a38b | 5495:1f0b15040456 |
---|---|
2 Copyright (C) 1993 Sun Microsystems, Inc. | 2 Copyright (C) 1993 Sun Microsystems, Inc. |
3 Copyright (C) 1995, 1996 Ben Wing. | 3 Copyright (C) 1995, 1996 Ben Wing. |
4 | 4 |
5 This file is part of XEmacs. | 5 This file is part of XEmacs. |
6 | 6 |
7 XEmacs is free software; you can redistribute it and/or modify it | 7 XEmacs is free software: you can redistribute it and/or modify it |
8 under the terms of the GNU General Public License as published by the | 8 under the terms of the GNU General Public License as published by the |
9 Free Software Foundation; either version 2, or (at your option) any | 9 Free Software Foundation, either version 3 of the License, or (at your |
10 later version. | 10 option) any later version. |
11 | 11 |
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT | 12 XEmacs is distributed in the hope that it will be useful, but WITHOUT |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | 14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
15 for more details. | 15 for more details. |
16 | 16 |
17 You should have received a copy of the GNU General Public License | 17 You should have received a copy of the GNU General Public License |
18 along with XEmacs; see the file COPYING. If not, write to | 18 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */ |
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
20 Boston, MA 02111-1307, USA. */ | |
21 | 19 |
22 /* Synched up with: Not in FSF. */ | 20 /* Synched up with: Not in FSF. */ |
23 | 21 |
24 /* Written by Ben Wing, October 1993. */ | 22 /* Written by Ben Wing, October 1993. */ |
25 | 23 |
26 #ifndef INCLUDED_opaque_h_ | 24 #ifndef INCLUDED_opaque_h_ |
27 #define INCLUDED_opaque_h_ | 25 #define INCLUDED_opaque_h_ |
28 | 26 |
29 typedef struct Lisp_Opaque | 27 typedef struct Lisp_Opaque |
30 { | 28 { |
31 struct LCRECORD_HEADER header; | 29 NORMAL_LISP_OBJECT_HEADER header; |
32 Bytecount size; | 30 Bytecount size; |
33 max_align_t data[1]; | 31 max_align_t data[1]; |
34 } Lisp_Opaque; | 32 } Lisp_Opaque; |
35 | 33 |
36 DECLARE_LRECORD (opaque, Lisp_Opaque); | 34 DECLARE_LISP_OBJECT (opaque, Lisp_Opaque); |
37 #define XOPAQUE(x) XRECORD (x, opaque, Lisp_Opaque) | 35 #define XOPAQUE(x) XRECORD (x, opaque, Lisp_Opaque) |
38 #define wrap_opaque(p) wrap_record (p, opaque) | 36 #define wrap_opaque(p) wrap_record (p, opaque) |
39 #define OPAQUEP(x) RECORDP (x, opaque) | 37 #define OPAQUEP(x) RECORDP (x, opaque) |
40 /* #define CHECK_OPAQUE(x) CHECK_RECORD (x, opaque) | 38 /* #define CHECK_OPAQUE(x) CHECK_RECORD (x, opaque) |
41 Opaque pointers should never escape to the Lisp level, so | 39 Opaque pointers should never escape to the Lisp level, so |
52 | 50 |
53 Lisp_Object make_opaque (const void *data, Bytecount size); | 51 Lisp_Object make_opaque (const void *data, Bytecount size); |
54 | 52 |
55 typedef struct Lisp_Opaque_Ptr | 53 typedef struct Lisp_Opaque_Ptr |
56 { | 54 { |
57 struct LCRECORD_HEADER header; | 55 NORMAL_LISP_OBJECT_HEADER header; |
58 void *ptr; | 56 void *ptr; |
59 } Lisp_Opaque_Ptr; | 57 } Lisp_Opaque_Ptr; |
60 | 58 |
61 DECLARE_LRECORD (opaque_ptr, Lisp_Opaque_Ptr); | 59 DECLARE_LISP_OBJECT (opaque_ptr, Lisp_Opaque_Ptr); |
62 #define XOPAQUE_PTR(x) XRECORD (x, opaque_ptr, Lisp_Opaque_Ptr) | 60 #define XOPAQUE_PTR(x) XRECORD (x, opaque_ptr, Lisp_Opaque_Ptr) |
63 #define wrap_opaque_ptr(p) wrap_record (p, opaque_ptr) | 61 #define wrap_opaque_ptr(p) wrap_record (p, opaque_ptr) |
64 #define OPAQUE_PTRP(x) RECORDP (x, opaque_ptr) | 62 #define OPAQUE_PTRP(x) RECORDP (x, opaque_ptr) |
65 | 63 |
66 EXTERN_C MODULE_API Lisp_Object make_opaque_ptr (void *val); | 64 EXTERN_C MODULE_API Lisp_Object make_opaque_ptr (void *val); |