(method ComponentDefinitionMethod, NameSpace string, ClassName string, isGlobal bool)
| 434 | } |
| 435 | |
| 436 | func getMethodCParams(method ComponentDefinitionMethod, NameSpace string, ClassName string, isGlobal bool) (string, error) { |
| 437 | parameters := "" |
| 438 | if (!isGlobal) { |
| 439 | parameters = "ctypes.c_void_p" |
| 440 | } |
| 441 | for k:=0; k<len(method.Params); k++ { |
| 442 | param := method.Params[k] |
| 443 | cparams, err := generateCTypesParameter(param, ClassName, method.MethodName, NameSpace) |
| 444 | if (err != nil) { |
| 445 | return "", err |
| 446 | } |
| 447 | for _, cparam := range cparams { |
| 448 | if (parameters != "") { |
| 449 | parameters = parameters + ", "; |
| 450 | } |
| 451 | parameters = parameters + cparam.ParamType |
| 452 | } |
| 453 | } |
| 454 | |
| 455 | return parameters, nil |
| 456 | } |
| 457 | |
| 458 | func loadFunctionTableFromMethod(componentdefinition ComponentDefinition, w LanguageWriter) error { |
| 459 | w.Writeln("symbolLookupMethodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p))") |
no test coverage detected