diff options
author | Vincent Sanders <vince@kyllikki.org> | 2012-11-03 13:48:44 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2012-11-03 13:48:44 +0000 |
commit | 89ee501986c247ddfbad0fb4cfbe4e0f3f486cbb (patch) | |
tree | a0317e5a373f3fea28927bc84a3a0d97fca64c91 /doc | |
parent | 408787939032719568b43d13fd0ea05d25d52781 (diff) | |
download | nsgenbind-89ee501986c247ddfbad0fb4cfbe4e0f3f486cbb.tar.gz nsgenbind-89ee501986c247ddfbad0fb4cfbe4e0f3f486cbb.tar.bz2 |
improve example and test bindings
Diffstat (limited to 'doc')
-rw-r--r-- | doc/example.bnd | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/doc/example.bnd b/doc/example.bnd index f2f81fb..dfd0bb5 100644 --- a/doc/example.bnd +++ b/doc/example.bnd @@ -173,7 +173,7 @@ setter baz %{ * JSObject *jsapi_InitClass_HTMLElement(JSContext *cx, JSObject *parent) */ api init %{ - %} +%} /* implementation of the c instance creation * @@ -199,11 +199,11 @@ api init %{ * */ api new %{ - %} +%} /* additional code in the instance finalise operation. * - * The body is copied verbatum into the output + * The body is copied verbatim into the output * * Prototype is * void jsclass_finalize(JSContext *cx, JSObject *obj) @@ -211,7 +211,7 @@ api new %{ * private is available (if appropriate) and freed after the body */ api finalise %{ - %} +%} /* resolver code * @@ -219,11 +219,18 @@ api finalise %{ * JSResolveOp with JSCLASS_NEW_RESOLVE specified and must provide a * complete implementation. * - * The body is copied verbatum into the output + * The body is copied verbatim into the output * * Prototype is: * JSBool jsclass_resolve(JSContext *cx, JSObject *obj, jsval id, uintN flags, JSObject **objp) * */ api resolve %{ - %} +%} + +/* mark the generated interface as a a global object + * + * The body is discarded. + */ +api global %{ +%}
\ No newline at end of file |