Skip to content

Commit

Permalink
Test.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Mar 5, 2019
1 parent 92cd199 commit 29c7917
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions plugins/python/plang/Invocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,23 +384,26 @@ void Invocation::begin(PointView& view, MetadataNode m)
insertArgument(name, (uint8_t *)data, dd->type(), view.size());
}

std::cerr << "Put metadata obj!\n";
// Put pipeline 'metadata' variable into module scope
Py_XDECREF(m_metadata_PyObject);
m_metadata_PyObject= plang::fromMetadata(m);
m_metadata_PyObject = plang::fromMetadata(m);

// Put 'schema' dict into module scope
std::cerr << "Put schema obj!\n";
Py_XDECREF(m_schema_PyObject);
MetadataNode s = view.layout()->toMetadata();
std::ostringstream ostrm;
Utils::toJSON(s, ostrm);
m_schema_PyObject = getPyJSON(ostrm.str());
ostrm.str("");

std::cerr << "Decref pyobj!\n";
Py_XDECREF(m_srs_PyObject);
MetadataNode srs = view.spatialReference().toMetadata();
Utils::toJSON(srs, ostrm);
m_srs_PyObject = getPyJSON(ostrm.str());
ostrm.str("");
std::cerr << "Leaving!\n";
}


Expand Down

0 comments on commit 29c7917

Please sign in to comment.