method

parse_signature

Importance_1
v2_1_10 - Show latest stable - 0 notes - Class: CParser
parse_signature(signature, tymap=nil) public

Parses a C prototype signature

If Hash tymap is provided, the return value and the arguments from the signature are expected to be keys, and the value will be the C type to be looked up.

Example:

include Fiddle::CParser
  #=> Object

parse_signature('double sum(double, double)')
  #=> ["sum", Fiddle::TYPE_DOUBLE, [Fiddle::TYPE_DOUBLE, Fiddle::TYPE_DOUBLE]]
Show source
Register or log in to add new notes.