python-module/cpplmodule.cc
/**
 * Read policy definition and corresponding function handler library from disk.
 */
Read policy definition and corresponding function handler library from disk.
Read policy definition and corresponding function handler library from disk .
static PyObject *cpplmodule_read_policy_definition_from_file(PyObject *self, PyObject *args)
{
  PyObject *retval;
  char *policyDefinitionFile, *functionHandlerLibPath;
  PolicyDefinition *pd;
  if (!PyArg_ParseTuple(args, "ss", &policyDefinitionFile, &functionHandlerLibPath)) {
    return NULL;
  }
  try {
    pd = cppl_read_policy_definition_from_file(policyDefinitionFile, functionHandlerLibPath);
  }
  catch (std::string s) {
    return PyErr_Format(CpplError, "%s", s.c_str());
  }
  long long pd_key = (long long)pd;
  pd_list[pd_key] = pd;
  retval = Py_BuildValue("L", pd_key);
  return retval;
}
static PyObject * cpplmodule_read_policy_definition_from_file ( PyObject * self , PyObject * args ) { PyObject * retval ; char * policyDefinitionFile , * functionHandlerLibPath ; PolicyDefinition * pd ; if ( ! PyArg_ParseTuple ( args , " " , & policyDefinitionFile , & functionHandlerLibPath ) ) { return NULL ; } try { pd = cppl_read_policy_definition_from_file ( policyDefinitionFile , functionHandlerLibPath ) ; } catch ( std :: string s ) { return PyErr_Format ( CpplError , " " , s . c_str ( ) ) ; } long long pd_key = ( long long ) pd ; pd_list [ pd_key ] = pd ; retval = Py_BuildValue ( " " , pd_key ) ; return retval ; }
Read policy definition and corresponding function handler library from disk.
Read policy definition and corresponding function handler library from disk .