nytl: hot fix
This commit is contained in:
parent
da2cb4261c
commit
0f84548f78
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"instance-identity": {
|
"instance-identity": {
|
||||||
"top-title": "Вэб чат ИУ9"
|
"top-title": "Вэб чат от ИУ9"
|
||||||
},
|
},
|
||||||
"phr": {
|
"phr": {
|
||||||
"decl": {
|
"decl": {
|
||||||
@ -18,6 +18,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"assets": "./assets",
|
"assets": "./assets",
|
||||||
|
"database": {
|
||||||
|
"type": "sqlite",
|
||||||
|
"file": "./iu9-ca-web-chat.db"
|
||||||
|
},
|
||||||
"limits": {
|
"limits": {
|
||||||
"max-users": 100000,
|
"max-users": 100000,
|
||||||
"max-rooms": 100000,
|
"max-rooms": 100000,
|
||||||
|
@ -27,7 +27,7 @@ namespace nytl {
|
|||||||
if (result.is_json) {
|
if (result.is_json) {
|
||||||
const json::JSON& P = *result.JSON_subval;
|
const json::JSON& P = *result.JSON_subval;
|
||||||
if (P.isArray() && what.isInteger()) {
|
if (P.isArray() && what.isInteger()) {
|
||||||
const std::vector<json::JSON> arr_p = P.asArray();
|
const std::vector<json::JSON>& arr_p = P.asArray();
|
||||||
int64_t ind_w = what.asInteger().get_int();
|
int64_t ind_w = what.asInteger().get_int();
|
||||||
ASSERT(ind_w > 0 && ind_w < arr_p.size(), "Expression \"array[integer]\" caused out-of-bound situation");
|
ASSERT(ind_w > 0 && ind_w < arr_p.size(), "Expression \"array[integer]\" caused out-of-bound situation");
|
||||||
result = LocalVarValue{true, "", &arr_p[ind_w]};
|
result = LocalVarValue{true, "", &arr_p[ind_w]};
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
{% ELDEF main %}
|
|
||||||
|
|
||||||
CCC
|
|
||||||
DDD
|
|
||||||
|
|
||||||
|
|
||||||
{% ENDELDEF %}
|
|
12
src/http_server/nytl_tests/HypertextPages/c.txt
Normal file
12
src/http_server/nytl_tests/HypertextPages/c.txt
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{% ELDEF cmain JSON cba %}
|
||||||
|
AAA
|
||||||
|
{% FOR _:val IN cba %}
|
||||||
|
TUTUTUTUTUTUTUTUN {% PUT jesccomp val %}
|
||||||
|
{% ENDFOR %}
|
||||||
|
AAA
|
||||||
|
{% FOR val IN cba[cba.k] %}
|
||||||
|
--> {% WRITE val %}
|
||||||
|
{% ENDFOR %}
|
||||||
|
AAA {% WRITE cba[cba.k][cba.i] %} AAA
|
||||||
|
|
||||||
|
{% ENDELDEF %}
|
@ -1,9 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
{% ELDEF main JSON cba %}
|
{% ELDEF main JSON cba %}
|
||||||
AAA
|
{% WRITE cba[cba.k][cba.i] %}
|
||||||
{% FOR _:val IN cba %}
|
|
||||||
TUTUTUTUTUTUTUTUN {% PUT jesccomp val %}
|
|
||||||
{% ENDFOR %}
|
|
||||||
|
|
||||||
{% ENDELDEF %}
|
{% ENDELDEF %}
|
@ -17,6 +17,8 @@ int main(int argc, char** argv) {
|
|||||||
cba["arr"][0] = json::JSON("zero");
|
cba["arr"][0] = json::JSON("zero");
|
||||||
cba["arr"][1] = json::JSON("one");
|
cba["arr"][1] = json::JSON("one");
|
||||||
cba["arr"][2] = json::JSON("two");
|
cba["arr"][2] = json::JSON("two");
|
||||||
|
cba["k"] = json::JSON("arr");
|
||||||
|
cba["i"] = json::JSON(1l);
|
||||||
// printf("DEBUG WAS: %p\n", &cba["boba"].g());
|
// printf("DEBUG WAS: %p\n", &cba["boba"].g());
|
||||||
// printf("%s\n", json::generate_str(cba["boba"].g(), json::print_compact).c_str());
|
// printf("%s\n", json::generate_str(cba["boba"].g(), json::print_compact).c_str());
|
||||||
// return 0;
|
// return 0;
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
#include <engine_engine_number_9/form_data_structure/urlencoded_query.h>
|
#include <engine_engine_number_9/form_data_structure/urlencoded_query.h>
|
||||||
#include <new_york_transit_line/templater.h>
|
#include <new_york_transit_line/templater.h>
|
||||||
|
|
||||||
#include "../http_server/engine_engine_number_9/running_mainloop.h"
|
|
||||||
|
|
||||||
bool termination = false;
|
bool termination = false;
|
||||||
|
|
||||||
void sigterm_action(int) {
|
void sigterm_action(int) {
|
||||||
|
Loading…
Reference in New Issue
Block a user