Changeset 15327


Ignore:
Timestamp:
Apr 14, 2012, 11:29:10 PM (8 years ago)
Author:
gb
Message:

cocoa-ide/builder-utilites.lisp: in MAKE-DOCTYPE-DICT, declare unused
keyword args to be ignorable.

cocoa-ide/cocoa-application.lisp, objc-bridge/objc-runtime.lisp: move
code which nukes NXArgc/NXArgv to a point just before Cocoa is loaded,
where it seems to work as intended. This makes it safer than it has
been to (REQUIRE "COCOA") in a lisp that was started with command-line
arguments.

See ticket:955, and likely some others.

Location:
trunk/source
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/cocoa-ide/builder-utilities.lisp

    r13035 r15327  
    233233                          (document-class nil)
    234234                          (exportable-as nil))
     235  (declare (ignorable bundlep exportable-as icon-file))
    235236  ;; certain values are required
    236237  (assert (or ls-item-content-types extensions mime-types ostypes)
  • trunk/source/cocoa-ide/cocoa-application.lisp

    r15291 r15327  
    3939(load-ide *cocoa-ide-force-compile*)
    4040
    41 #+darwin-target
    42 ;;; Nuke any command-line arguments, to keep the Cocoa runtime from
    43 ;;; trying to process them.
    44 (let* ((argv (foreign-symbol-address "NXArgv"))
    45        (argc (foreign-symbol-address "NXArgc")))
    46   (when argc
    47     (setf (pref argc :int) 1))
    48   (when argv
    49     (setf (paref (%get-ptr argv) (:* :char) 1) +null-ptr+)))
     41
    5042 
    5143
  • trunk/source/objc-bridge/objc-runtime.lisp

    r14821 r15327  
    394394(pushnew #'load-cocoa-framework *lisp-system-pointer-functions* :key #'function-name)
    395395
     396#+darwin-target
     397;;; Nuke any command-line arguments, to keep the Cocoa runtime from
     398;;; trying to process them.
     399(let* ((argv (foreign-symbol-address "NXArgv"))
     400       (argc (foreign-symbol-address "NXArgc")))
     401  (when argc
     402    (setf (pref argc :int) 1))
     403  (when argv
     404    (setf (paref (%get-ptr argv) (:* :char) 1) +null-ptr+)))
     405
    396406#-cocotron
    397407(load-cocoa-framework)
Note: See TracChangeset for help on using the changeset viewer.