/trunk/Examples/test-suite/langobj.i

# · Swig · 41 lines · 26 code · 15 blank · 0 comment · 0 complexity · 33a8015ec7e12a304f15850524942c46 MD5 · raw file

  1. %module langobj
  2. #ifndef SWIG_Object
  3. #define SWIG_Object void *
  4. #endif
  5. %inline %{
  6. #ifdef SWIGTCL
  7. #define SWIG_Object Tcl_Obj *
  8. #endif
  9. #ifdef SWIGPYTHON
  10. #define SWIG_Object PyObject *
  11. #endif
  12. #ifdef SWIGRUBY
  13. #define SWIG_Object VALUE
  14. #endif
  15. #ifndef SWIG_Object
  16. #define SWIG_Object void *
  17. #endif
  18. %}
  19. %inline {
  20. SWIG_Object identity(SWIG_Object x) {
  21. #ifdef SWIGPYTHON
  22. Py_XINCREF(x);
  23. #endif
  24. return x;
  25. }
  26. }