/+junk/c_sdl_joypad_ducktape

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/c_sdl_joypad_ducktape

« back to all changes in this revision

Viewing changes to src/defs.h

  • Committer: Gustav Hartvigsson
  • Date: 2014-08-31 18:43:53 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20140831184353-20wfpher7cqzx3at
* Started working on the an object baseclass to make things
   easyer when working with the EcmaScript stuffs.
* Added BEGIN_DEGLS and END_DECELS.
* Fixed up the docs a bit...

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 */
8
8
 
9
9
/**
 
10
 * <tt>BEGIN_DECLS</tt> and <tt>END_DECLS</tt> is are utility macros
 
11
 * wrapping <tt>extern "C"</tt> for using C headers with C++ code.
 
12
 *
 
13
 * @code {.c}
 
14
// Foo.h
 
15
#ifndef H_FOO
 
16
#define H_FOO
 
17
 
 
18
BEGIN_DECLS
 
19
 
 
20
// Code does here
 
21
 
 
22
END_DECLS
 
23
 
 
24
#endif
 
25
  @endcode
 
26
 */
 
27
#define BEGIN_DECLS \
 
28
  #ifdef __cplusplus \
 
29
  extern "C" {
 
30
 
 
31
/**
 
32
 * See <tt> BEGIN_DECLS </tt>.
 
33
 */
 
34
#define END_DECLS \
 
35
  } \
 
36
  #endif
 
37
 
 
38
BEGIN_DECLS
 
39
 
 
40
/**
10
41
 * Represents a pointer. Nothing special with it, just a pointer...
11
42
 */
12
43
typedef void * _pointer;
36
67
 */
37
68
typedef void * (* FreeFunc)(_pointer obj);
38
69
 
 
70
END_DECLS
 
71
 
39
72
#endif /* __H_DEFS__ */