Sun Nov 15 10:18:33 EST 2009 Greg Pfeil <email address hidden>
* more flexible name translations
FOREIGN-/LISP-NAME are now exported and take a package argument. This allows users to override the name translations on a package-by-package basis. EG,
The functions TRANSLATE-UNDERSCORE-SEPARATED-NAME and TRANSLATE-CAMELCASE-NAME have also been added and are exported. They cover common foreign name translations (TRANSLATE-UNDERSCORE-SEPARATED-NAME is the default, and you can see TRANSLATE-CAMELCASE-NAME in the example above).
The patch needs to be reviewed, tests and documentation need to be written. LISP-NAME is probably too generic a name to be exported from CFFI.
Sun Nov 15 10:18:33 EST 2009 Greg Pfeil <email address hidden>
* more flexible name translations
FOREIGN-/LISP-NAME are now exported and take a package argument. This allows users to override the name translations on a package-by-package basis. EG,
(defmethod cffi:lisp-name
((spec string) (package (eql (find-package :llvm))) &optional varp) CamelCase -> 'llvm:upper- camel-case"
(translate- camelcase- name (subseq spec 4)
:upper- initial- p t
:special- words special-words))))
"LLVMUpper
(intern (format nil (if varp "*~a*" "~a")
The functions TRANSLATE- UNDERSCORE- SEPARATED- NAME and TRANSLATE- CAMELCASE- NAME have also been added and are exported. They cover common foreign name translations (TRANSLATE- UNDERSCORE- SEPARATED- NAME is the default, and you can see TRANSLATE- CAMELCASE- NAME in the example above).
The patch needs to be reviewed, tests and documentation need to be written. LISP-NAME is probably too generic a name to be exported from CFFI.