src/utilities.lisp: Share `int' to `sod' and `optparse' packages.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 4 Aug 2019 12:48:52 +0000 (13:48 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 4 Aug 2019 12:48:52 +0000 (13:48 +0100)
Now we don't have to choose between the C type and the option type.

doc/SYMBOLS
src/utilities.lisp

index 3df75e0..40aa3f5 100644 (file)
@@ -78,7 +78,7 @@ c-types-impl.lisp
   fun                                           c-type
   func                                          c-type
   cl:function                                   function class c-type
-  int                                           c-type
+  sod-utilities:int                             c-type opthandler
   kind-c-tagged-type                            generic
   llong                                         c-type
   long                                          c-type
@@ -1019,7 +1019,6 @@ expand-c-type-form
   (eql fn) t
   (eql fun) t
   (eql func) t
-  (eql int) t
   (eql long) t
   (eql long-double) t
   (eql long-double-complex) t
@@ -1044,6 +1043,7 @@ expand-c-type-form
   (eql wchar-t) t
   (eql []) t
   (eql sod-parser:lisp) t
+  (eql sod-utilities:int) t
   cl:string t
 expand-c-type-spec
   (eql cl:char)
@@ -1057,7 +1057,6 @@ expand-c-type-spec
   (eql double-imaginary)
   (eql float-complex)
   (eql float-imaginary)
-  (eql int)
   (eql llong)
   (eql long)
   (eql long-double)
@@ -1100,6 +1099,7 @@ expand-c-type-spec
   (eql va-list)
   (eql void)
   (eql wchar-t)
+  (eql sod-utilities:int)
   cl:list
   cl:string
 sod-parser:file-location
@@ -2219,7 +2219,7 @@ optparse.lisp
   exit                                          function
   help-options                                  optmacro
   inc                                           opthandler
-  int                                           opthandler
+  sod-utilities:int                             c-type opthandler
   invoke-option-handler                         function
   cl:keyword                                    opthandler
   cl:list                                       function class parser opthandler
@@ -2314,6 +2314,7 @@ utilities.lisp
   info                                          function
   information                                   class
   instance-initargs                             generic
+  int                                           c-type opthandler
   invoke-associated-restart                     function
   it
   lbuild-add                                    function
index 6e7a592..e7e1ae2 100644 (file)
 (cl:in-package #:sod-utilities)
 
 ;;;--------------------------------------------------------------------------
+;;; Common symbols.
+;;;
+;;; Sometimes, logically independent packages will want to use the same
+;;; symbol, and these uses (by careful design) don't conflict with each
+;;; other.  If we export the symbols here, then the necessary sharing will
+;;; happen automatically.
+
+(export 'int)                          ; used by c-types and optparse
+
+;;;--------------------------------------------------------------------------
 ;;; Macro hacks.
 
 (export 'with-gensyms)