diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2019-08-01 19:58:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-01 19:58:03 +0100 |
commit | 87bf8ae7aa25bdd024ca7c5f8f4216926393fa3c (patch) | |
tree | 67ff5921441fc1c81d4663b17c0763dee09b61f2 | |
parent | 3cc4b211630c271f2e127f5283c9a3340485b347 (diff) | |
parent | a4432a68da2d85323f65f8205f18451c0979395e (diff) | |
download | swig-87bf8ae7aa25bdd024ca7c5f8f4216926393fa3c.tar.gz |
Merge pull request #1604 from vadz/init-doc
Correct %init documentation for C#/Java
-rw-r--r-- | Doc/Manual/SWIG.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/Manual/SWIG.html b/Doc/Manual/SWIG.html index d1492d30a..aec48ef03 100644 --- a/Doc/Manual/SWIG.html +++ b/Doc/Manual/SWIG.html @@ -3438,6 +3438,18 @@ initialization on module loading, you could write this: %} </pre></div> +<p> +Please note that some language backends (e.g. C# or Java) don't have any +initialization function, hence you should define a global object performing +the necessary initialization for them instead: +</p> + +<div class="code"><pre> +%init %{ + static struct MyInit { MyInit() { init_variables(); } } myInit; +%} +</pre></div> + <H2><a name="SWIG_nn45">5.7 An Interface Building Strategy</a></H2> |