Jump to content
  • Advertisement
Sign in to follow this  
vroad

Assigning pointer of object method to funcptr

This topic is 2520 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

At first, I modified compiler and builder to compile script successfully.

  • Compiler and builder now do not raise error when method pointer is passed as funcptr.

    I don't know how to implement these. Currently, data in stack will break while executing script.

    • Save the pointer of current object into stack on asBC_FuncPtr call.
    • Get not only function pointer but also object pointer.

      I created patch from rev1111.
      http://pastebin.com/7sPcUrxx

Share this post


Link to post
Share on other sites
Advertisement
The function pointers weren't meant to hold method pointers. To use method pointers as callbacks I need to implement delegates.

But thanks for sharing the attempt anyway. I'll take a look at the changes you made to see if I can reuse it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!