1
0
Fork 0
mirror of git://git.psyced.org/git/psyced synced 2024-08-15 03:25:10 +00:00

are we going to have state implemented just by mistake?

This commit is contained in:
psyc://psyced.org/~lynX 2011-05-23 13:02:04 +02:00
parent c4a915e82f
commit 7502990918
9 changed files with 32 additions and 29 deletions

View file

@ -1113,13 +1113,18 @@ protected int deliver(mixed ip, string host, string mc, string buffer, mapping c
return 1;
}
void peek(string data) {
// temporary new "lfun" called from driver's comm.c to peek into new connection
void connection_peek(string data) {
P4((">> peek: %O\n", data));
#ifdef USE_SPYC
# if !__EFUN_DEFINED__(psyc_parse)
# echo New PSYC syntax will not work: Driver compiled without libpsyc!
# endif
if (data[0] == C_GLYPH_NEW_PACKET_DELIMITER) {
# if __EFUN_DEFINED__(enable_binary)
enable_binary(ME);
# else
# echo New PSYC syntax will not work: Driver compiled without enable_binary!
raise_error("Driver compiled without enable_binary()");
# endif
}

View file

@ -274,6 +274,7 @@ static varargs string render_psyc(mixed source, string mc, mixed data,
if (mappingp(vars))
mapeach (key, val, vars) {
// psyc_isRoutingVar() would be faster here I presume
routeMe = isRouting[key];
if ((routeMe &&! (routeMe & PSYC_ROUTING_RENDER))
|| abbrev("_INTERNAL", key))
@ -286,8 +287,7 @@ static varargs string render_psyc(mixed source, string mc, mixed data,
}
return psyc_render(({ rvars, evars, mc, data }));
#endif
#else
if (mappingp(vars))
vars = vars + rvars;
else
@ -323,6 +323,7 @@ static varargs string render_psyc(mixed source, string mc, mixed data,
if (strlen(rbuf)) return rbuf[1 ..] +"\n"+
ebuf +"\n" S_GLYPH_PACKET_DELIMITER "\n";
return ebuf +"\n" S_GLYPH_PACKET_DELIMITER "\n";
#endif
}
// notice for completeness: the PSYC renderer does not convert_charset