[fetter-devel] More on overloaded C++ functions -> Lisp ???

Kenny Tilton ktilton at nyc.rr.com
Tue Sep 27 18:12:26 UTC 2005



> Next issue. I get these two bindings for FTGL:
>
> (cffi:defcfun ("_ZN6FTFont7AdvanceEPKw" FTFont-Advance) :float
>  (this :pointer) (string :pointer))
> (cffi:defcfun ("_ZN6FTFont7AdvanceEPKc" FTFont-Advance-1) :float
>  (this :pointer) (string :pointer))
>
> The first corresponds to an overloaded  C++ method specialized (if you 
> will) on a string of wchar_ts, the second to a string of chars. I 
> guess that is the trailing w/c in the mangled name. Having done this 
> research (by examining the FTGL C++ source), I guess I will go with 
> Advance-1, but there seems to be a problem here. Just not sure where. 

OK, here is a second case of the above, a little hairier:

(cl:defun FTFont-Render (this string)
  (vzn:virtual-funcall this 6 0 :pointer this :pointer string :void))
 (cl:defun FTFont-Render-1 (this string)
  (vzn:virtual-funcall this 7 0 :pointer this :pointer string :void))
 
This is still the char vs wchar thing, but now I cannot tell which is 
which.

-- 
Kenny

Why Lisp? http://wiki.alu.org/RtL_Highlight_Film

"I've wrestled with reality for 35 years, Doctor, and I'm happy to state I finally won out over it."
    Elwood P. Dowd, "Harvey", 1950






More information about the fetter-devel mailing list