Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native function output arguments #15

Open
lgrahl opened this issue Jun 21, 2015 · 0 comments
Open

Native function output arguments #15

lgrahl opened this issue Jun 21, 2015 · 0 comments

Comments

@lgrahl
Copy link
Owner

lgrahl commented Jun 21, 2015

Some native functions like PLAYER::GET_PLAYER_RGB_COLOUR store the output values in the passed arguments using pointers. Fortunately, there are not many functions that behave in this manner. SWIG has a solution for this (called typemaps). However, there are some problems:

  • The typemaps need to be defined manually in natives.i
  • A typemap applies to all functions that have arguments with the same name and type
  • There are no predefined typemaps for custom types (but they all use integers internally, so this shouldn't be a big problem)
  • Parameter names in natives.h will change in the future

If you find a native function that has not been covered by the currently defined typemaps, please fix natives.i directly or add a comment here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant