2002-05-17 Al Riddoch <alriddoch@zepler.org>

* rulesets/Py_Operation.cpp, rulesets/Py_Operation.h: Add a variant
	  of the python Operation wrapper which handles const operations.

	* rulesets/PythonMindScript.cpp, rulesets/PythonThingScript.cpp:
	  Pass const versions of operations to the python scripts, rather
	  than having to copy them.

	* server/ServerRouting.cpp: Add build date, time and version to
	  server info.
This commit is contained in:
Al Riddoch 2002-05-17 17:18:40 +00:00
parent 8ef5400ad4
commit 13922d54da
8 changed files with 133 additions and 18 deletions

View file

@ -37,8 +37,8 @@ bool PythonMindScript::Operation(const std::string & op_type,
<< std::flush;);
return false;
}
OperationObject * py_op = newAtlasRootOperation(NULL);
py_op->operation = new RootOperation(op);
ConstOperationObject * py_op = newAtlasConstRootOperation(NULL);
py_op->operation = &op;
py_op->own = 0;
py_op->from = mind.map.getAdd(op.GetFrom());
py_op->to = mind.map.getAdd(op.GetTo());
@ -56,7 +56,6 @@ bool PythonMindScript::Operation(const std::string & op_type,
"(OO)", py_op, py_sub_op);
Py_DECREF(py_sub_op);
}
delete py_op->operation;
Py_DECREF(py_op);
if (ret != NULL) {
debug( std::cout << "Called python method " << op_name << std::endl