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.

36 lines
801 B

  1. /* -----------------------------------------------------------------------------
  2. * Ruby API portion that goes into the runtime
  3. * ----------------------------------------------------------------------------- */
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. SWIGINTERN VALUE
  8. SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
  9. if (NIL_P(target)) {
  10. target = o;
  11. } else {
  12. if (TYPE(target) != T_ARRAY) {
  13. VALUE o2 = target;
  14. target = rb_ary_new();
  15. rb_ary_push(target, o2);
  16. }
  17. rb_ary_push(target, o);
  18. }
  19. return target;
  20. }
  21. /* For ruby1.8.4 and earlier. */
  22. #ifndef RUBY_INIT_STACK
  23. RUBY_EXTERN void Init_stack(VALUE* addr);
  24. # define RUBY_INIT_STACK \
  25. VALUE variable_in_this_stack_frame; \
  26. Init_stack(&variable_in_this_stack_frame);
  27. #endif
  28. #ifdef __cplusplus
  29. }
  30. #endif