Hi. I have a situation with libgit2 where the function I need to call is a field in a struct (the field gets populated with different functions with the same signature depending on certain conditions). Iâm facing two problems now: 1. how do I define a function as the field type of an NBExternalStructure? 2. how can I call the function? Iâve tried using callbacks as field types. That works as far as I can access the functions by pointer. But how would I then call that function? Iâve looked at NBNativeFunction and NBNativeFunctionGen but I canât see how I should use either of those to make a plain call. Hereâs a more precise description of my problem: writepack := LG2GitOdbWritepackS new. ⦠âinitialize the struct externallyâ ânow call the function âcommitâ and pass the arguments (this is how I imagine it could workâ¦)" writepack commit value: writepack value: anotherStruct. Needed struct fields: backend: git_odb_backend * append: int (*)(git_odb_writepack *, const void *, size_t, git_transfer_progress *) commit: int (*)(git_odb_writepack *, git_transfer_progress *) free: void (*)(git_odb_writepack *) My current (ad hoc) struct fields: fieldsDesc ^#( LG2GitOdbO backend; LG2WritePackAppendCb append; LG2WritePackCommitCb commit; LG2WritePackFreeCb free; ) Iâd even be happy if I have to implement a method on LG2GitOdbWritepackS for every function call (e.g. âwritepack commit: arg1 and: arg2â) but how would I make the call? Any ideas? Max