func.c 527 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. */
  5. #include <stdio.h>
  6. int
  7. python_func(int val);
  8. int
  9. add(int val1, int val2)
  10. {
  11. return val1 + val2;
  12. }
  13. int
  14. c_func(int val)
  15. {
  16. printf("c: in c_func with input: %d\n", val);
  17. printf("c: calling python_func(%d)\n", val + 1);
  18. int res = python_func(val + 1);
  19. printf("c: result from python_func: %d\n", res);
  20. printf("c: returning %d\n", res + 1);
  21. return res + 1;
  22. }
  23. int
  24. main()
  25. {}