aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2020-04-25 05:13:41 +1000
committeronefang2020-04-25 05:13:41 +1000
commit581d1fa6bfd16e55457f081be6ae4a2af341425a (patch)
treeaf87f8e28a5808fac1c697e051f40a2062de58ad
parentLeak instead of crash, until I sort it out later. (diff)
downloadopensim-SC_OLD-581d1fa6bfd16e55457f081be6ae4a2af341425a.zip
opensim-SC_OLD-581d1fa6bfd16e55457f081be6ae4a2af341425a.tar.gz
opensim-SC_OLD-581d1fa6bfd16e55457f081be6ae4a2af341425a.tar.bz2
opensim-SC_OLD-581d1fa6bfd16e55457f081be6ae4a2af341425a.tar.xz
Comment out the Lua example at the very end.
-rw-r--r--src/sledjchisl/sledjchisl.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c
index f783be0..e30cb47 100644
--- a/src/sledjchisl/sledjchisl.c
+++ b/src/sledjchisl/sledjchisl.c
@@ -6569,7 +6569,7 @@ fcgiDone:
6569 { 6569 {
6570 } 6570 }
6571 6571
6572 6572/*
6573 double sum; 6573 double sum;
6574 6574
6575 // Load the file containing the script we are going to run 6575 // Load the file containing the script we are going to run
@@ -6580,13 +6580,14 @@ fcgiDone:
6580 E("Couldn't load file: %s", lua_tostring(L, -1)); 6580 E("Couldn't load file: %s", lua_tostring(L, -1));
6581 goto finished; 6581 goto finished;
6582 } 6582 }
6583*/
6583 6584
6584 /* 6585 /*
6585 * Ok, now here we go: We pass data to the lua script on the stack. 6586 * Ok, now here we go: We pass data to the lua script on the stack.
6586 * That is, we first have to prepare Lua's virtual stack the way we 6587 * That is, we first have to prepare Lua's virtual stack the way we
6587 * want the script to receive it, then ask Lua to run it. 6588 * want the script to receive it, then ask Lua to run it.
6588 */ 6589 */
6589 lua_newtable(L); /* We will pass a table */ 6590// lua_newtable(L); /* We will pass a table */
6590 6591
6591 /* 6592 /*
6592 * To put values into the table, we first push the index, then the 6593 * To put values into the table, we first push the index, then the
@@ -6603,6 +6604,7 @@ fcgiDone:
6603 * of the stack, so that after it has been called, the table is at the 6604 * of the stack, so that after it has been called, the table is at the
6604 * top of the stack. 6605 * top of the stack.
6605 */ 6606 */
6607/*
6606 for (i = 1; i <= 5; i++) 6608 for (i = 1; i <= 5; i++)
6607 { 6609 {
6608 lua_pushnumber(L, i); // Push the table index 6610 lua_pushnumber(L, i); // Push the table index
@@ -6627,17 +6629,17 @@ fcgiDone:
6627 I("Script returned: %.0f", sum); 6629 I("Script returned: %.0f", sum);
6628 6630
6629 lua_pop(L, 1); // Take the returned value out of the stack 6631 lua_pop(L, 1); // Take the returned value out of the stack
6630 6632*/
6631 6633
6632finished: 6634finished:
6633 6635
6634 // An example of calling a toy directly. 6636 // An example of calling a toy directly.
6635 printf("\n\n"); 6637// printf("\n\n");
6636 char *argv[] = {"ls", "-l", "-a", NULL}; 6638// char *argv[] = {"ls", "-l", "-a", NULL};
6637 printf("%d\n", runToy(argv)); 6639// printf("%d\n", runToy(argv));
6638 6640
6639 6641
6640 puts(""); 6642 puts("This is the end my friend.");
6641 fflush(stdout); 6643 fflush(stdout);
6642 6644
6643 cleanup(); 6645 cleanup();