Skip to content

Commit 69f6c0b

Browse files
author
Andrew D. France
committed
Explicitly adding #:lpdword to the :export list in the defpackage form.
1 parent 6971a46 commit 69f6c0b

File tree

1 file changed

+16
-28
lines changed

1 file changed

+16
-28
lines changed

cl-win32-types.lisp

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22-
|#
22+
|#
2323

2424
(defpackage #:cl-win32-types
2525
(:use #:cl #:cffi)
@@ -34,8 +34,9 @@ SOFTWARE.
3434
#:handle #:pvoid #:win-atom #:hinstance #:hwnd #:hdc #:hicon #:hbrush #:hfont
3535
#:hmodule #:sc_handle #:hresult #:langid #:lcid #:colorref
3636

37-
;; String Pointer Types
38-
#:lpstr #:lpcstr #:lpwstr #:lpcwstr #:pwchar #:pwstr
37+
;; Explicit Pointer Types (LP = Long Pointer)
38+
#:lpdword #:lpwstr #:lpcwstr #:lpstr #:lpcstr #:pwchar #:pwstr
39+
#:lphandle #:lpvoid
3940

4041
;; Platform-Dependent Pointer-Sized Types
4142
#:int_ptr #:uint_ptr #:dword_ptr #:ulong_ptr))
@@ -90,33 +91,20 @@ SOFTWARE.
9091
(defctype sc_handle handle)
9192

9293
;;;--------------------------------------------------------------------------
93-
;;; String Pointer Types (LP = Long Pointer)
94+
;;; Explicit Pointer Types (LP = Long Pointer)
9495
;;;--------------------------------------------------------------------------
9596

96-
(defctype lpstr :pointer)
97-
(defctype lpcstr :pointer)
98-
(defctype lpwstr :pointer)
99-
(defctype lpcwstr :pointer)
100-
(defctype pwchar :pointer)
101-
(defctype pwstr :pointer)
97+
(defctype lpdword :pointer) ; Pointer to a DWORD
98+
(defctype lphandle :pointer) ; Pointer to a HANDLE
99+
(defctype lpvoid :pointer) ; Pointer to void (generic pointer)
102100

103-
;;;--------------------------------------------------------------------------
104-
;;; Platform-Dependent Pointer-Sized Types
105-
;;;--------------------------------------------------------------------------
106-
107-
#+(and (or :win32 :windows) :32-bit)
108-
(progn
109-
(defctype dword_ptr :uint32)
110-
(defctype int_ptr :int32)
111-
(defctype uint_ptr :uint32)
112-
(defctype ulong_ptr :uint32))
113-
114-
#+(and (or :win32 :windows) :64-bit)
115-
(progn
116-
(defctype dword_ptr :uint64)
117-
(defctype int_ptr :int64)
118-
(defctype uint_ptr :uint64)
119-
(defctype ulong_ptr :uint64))
101+
;; String pointer types
102+
(defctype lpstr :string) ; Pointer to an ANSI string
103+
(defctype lpcstr :string) ; Pointer to a constant ANSI string
104+
(defctype lpwstr :pointer) ; Pointer to a wide (Unicode) string. Use :pointer for manual management.
105+
(defctype lpcwstr :pointer) ; Pointer to a constant wide (Unicode) string. Use :pointer for manual management.
106+
(defctype pwchar :pointer) ; Pointer to a WCHAR
107+
(defctype pwstr :pointer) ; Pointer to a wide (Unicode) string
120108

121109
;;;--------------------------------------------------------------------------
122110
;;; Platform-Dependent Pointer-Sized Types
@@ -140,4 +128,4 @@ SOFTWARE.
140128
#-(or (and (or :win32 :windows) :64-bit)
141129
(and (or :win32 :windows) :32-bit))
142130
(error "cl-win32-types: Could not determine platform pointer size.
143-
This library requires the Lisp implementation to have either :64-BIT or :32-BIT in *features* on Windows.")
131+
This library requires the Lisp implementation to have either :64-BIT or :32-BIT in *features* on Windows.")

0 commit comments

Comments
 (0)