Re: [Pharo-dev] [NativeBoost] Calling a function in a struct

2015-02-22 Thread Max Leske
Yay, got it! It’s actually really straight forward if you know the stuff… The magic is in NBFFICalloutAPI. This class provides the method #function:address:. So if I let NB create an external object (subclass of NBExternalObject) for the struct field that provides the function, the address of

Re: [Pharo-dev] [NativeBoost] Calling a function in a struct

2015-02-22 Thread Max Leske
On 22 Feb 2015, at 01:19, Nicolai Hess nicolaih...@web.de wrote: 2015-02-22 0:06 GMT+01:00 Max Leske maxle...@gmail.com mailto:maxle...@gmail.com: 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

[Pharo-dev] [NativeBoost] Calling a function in a struct

2015-02-21 Thread Max Leske
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

Re: [Pharo-dev] [NativeBoost] Calling a function in a struct

2015-02-21 Thread Nicolai Hess
2015-02-22 0:06 GMT+01:00 Max Leske maxle...@gmail.com: 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.