Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. .def("__add__",
  2. [](const triton::ast::SharedAbstractNode& node1, const triton::ast::SharedAbstractNode& node2) {
  3. triton::ast::AstContext& ast = node1->getContext();
  4. return ast.bvadd(node1, node2);
  5. }, pybind11::is_operator())
  6.  
  7. .def("__add__",
  8. [](const triton::ast::SharedAbstractNode& node, pybind11::int_ o) {
  9. triton::ast::AstContext& ast = node->getContext();
  10. triton::uint512 value = PyLong_AsUint512(o.ptr());
  11. return ast.bvadd(node, ast.bv(value, node->getBitvectorSize()));
  12. }, pybind11::is_operator())
  13.  
  14. .def("__add__",
  15. [](pybind11::int_ o, const triton::ast::SharedAbstractNode& node) {
  16. triton::ast::AstContext& ast = node->getContext();
  17. triton::uint512 value = PyLong_AsUint512(o.ptr());
  18. return ast.bvadd(ast.bv(value, node->getBitvectorSize()), node);
  19. }, pybind11::is_operator())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement