fallback.c 711 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. ** fallback.c
  3. ** TecCGraf - PUC-Rio
  4. */
  5. char *rcs_fallback="$Id: $";
  6. #include <stdio.h>
  7. #include "fallback.h"
  8. #include "lua.h"
  9. void luaI_errorFB (void)
  10. {
  11. lua_Object o = lua_getparam(1);
  12. if (lua_isstring(o))
  13. fprintf (stderr, "lua: %s\n", lua_getstring(o));
  14. else
  15. fprintf(stderr, "lua: unknown error\n");
  16. }
  17. void luaI_indexFB (void)
  18. {
  19. lua_pushnil();
  20. }
  21. void luaI_gettableFB (void)
  22. {
  23. lua_error("indexed expression not a table");
  24. }
  25. void luaI_arithFB (void)
  26. {
  27. lua_error("unexpected type at conversion to number");
  28. }
  29. void luaI_concatFB (void)
  30. {
  31. lua_error("unexpected type at conversion to string");
  32. }
  33. void luaI_orderFB (void)
  34. {
  35. lua_error("unexpected type at comparison");
  36. }