~ubuntu-branches/ubuntu/vivid/emscripten/vivid-proposed

« back to all changes in this revision

Viewing changes to demos/scons-embind/foo.cpp

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2014-01-19 14:12:40 UTC
  • mfrom: (4.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20140119141240-nfiw0p8033oitpfz
Tags: 1.9.0~20140119~7dc8c2f-1
* New snapshot release (Closes: #733714)
* Provide sources for javascript and flash. Done in orig-tar.sh
  Available in third_party/websockify/include/web-socket-js/src/
  (Closes: #735903)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <stdio.h>
2
 
#include <emscripten/bind.h>
3
 
 
4
 
void print_some_stuff(int a, float b, const std::string& s) {
5
 
    printf("print_some_stuff: %d, %f, %s\n", a, b, s.c_str());
6
 
}
7
 
 
8
 
EMSCRIPTEN_BINDINGS(foo) {
9
 
    emscripten::function("print_some_stuff", &print_some_stuff);
10
 
}
11