Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.5 KiB

  1. /* -----------------------------------------------------------------------------
  2. * See the LICENSE file for information on copyright, usage and redistribution
  3. * of SWIG, and the README file for authors - http://www.swig.org/release.html.
  4. *
  5. * guile_scm.swg
  6. *
  7. * This SWIG interface file is processed if the Guile module is run
  8. * with SCM_ flavor.
  9. * ----------------------------------------------------------------------------- */
  10. #define SWIGGUILE_SCM
  11. %runtime "swigrun.swg" // Common C API type-checking code
  12. %runtime "guile_scm_run.swg"
  13. %include <ghinterface.i>
  14. %include <guile.i>
  15. %runtime %{
  16. #define GUILE_MAYBE_VALUES \
  17. if (gswig_list_p) gswig_result = scm_values(gswig_result);
  18. #define GUILE_MAYBE_VECTOR \
  19. if (gswig_list_p) gswig_result = scm_vector(gswig_result);
  20. #define SWIG_APPEND_VALUE(object) \
  21. if (gswig_result == SCM_UNSPECIFIED) \
  22. gswig_result = object; \
  23. else { \
  24. if (!gswig_list_p) { \
  25. gswig_list_p = 1; \
  26. gswig_result = scm_listify(gswig_result, object, SCM_UNDEFINED); \
  27. } \
  28. else \
  29. gswig_result = scm_append(scm_listify(gswig_result, scm_listify(object, SCM_UNDEFINED), SCM_UNDEFINED)); \
  30. }
  31. /* used by Lib/exception.i */
  32. #define gh_symbol2scm scm_str2symbol
  33. /* useb by Lib/cdata.i */
  34. #define gh_str2scm scm_mem2string
  35. %}
  36. %insert(init) "swiginit.swg"
  37. %init %{
  38. SWIG_GUILE_INIT_STATIC void
  39. SWIG_init(void)
  40. {
  41. SWIG_InitializeModule(0);
  42. SWIG_PropagateClientData();
  43. %}