1/* ----------------------------------------------------------------------------- 2 * See the LICENSE file for information on copyright, usage and redistribution 3 * of SWIG, and the README file for authors - http://www.swig.org/release.html. 4 * 5 * longlongs.i 6 * 7 * Typemap addition for support of 'long long' type and 'unsigned long long 8 * Makes use of swig-def-foreign-class, so this header should be loaded 9 * after allegrocl.swg and after any custom user identifier-conversion 10 * functions have been defined. 11 * ----------------------------------------------------------------------------- */ 12 13%typemap(in) long long, unsigned long long "$1 = $input;"; 14%typemap(out) long long, unsigned long long "$result = &$1;"; 15 16%typemap(ffitype) long long "(:struct (l1 :long) (l2 :long))"; 17%typemap(ffitype) unsigned long long "(:struct (l1 :unsigned-long) 18 (l2 :unsigned-long))"; 19 20%typemap(lout) long long 21" (make-instance #.(swig-insert-id \"longlong\" () :type :class) 22 :foreign-address $body)"; 23%typemap(lout) unsigned long long 24" (make-instance #.(swig-insert-id \"ulonglong\" () :type :class) 25 :foreign-address $body)"; 26 27%insert("lisphead") %{ 28 29(swig-def-foreign-class "longlong" 30 (ff:foreign-pointer) 31 (:struct (:struct (l1 :long) (l2 :long)))) 32 33(swig-def-foreign-class "ulonglong" 34 (ff:foreign-pointer) 35 (:struct (:struct (l1 :unsigned-long) (l2 :unsigned-long)))) 36%} 37