Commit 17c33473 authored by Ahmed Soliman's avatar Ahmed Soliman Committed by Facebook Github Bot

Fixing namespace in iobuf python utility extensions and adding it to CMake

Summary: Moving some `iobuf` helpers from the `thrift::py3` namespace into `folly` since this now lives in folly. Also fixing CMake to build iobuf in folly not in thrift.

Reviewed By: vitaut

Differential Revision: D16221272

fbshipit-source-id: a7bdde1b60cd6d7de06bf2040506a87c3153c37f
parent cc3f054a
......@@ -41,6 +41,8 @@ if (PYTHON_EXTENSIONS)
"executor.pyx"
"futures.pxd"
"range.pxd"
"iobuf.pxd"
"iobuf.pyx"
"__init__.pxd"
"AsyncioExecutor.h")
message(
......
......@@ -27,8 +27,7 @@
#define PyGILState_Check() (true)
#endif
namespace thrift {
namespace py3 {
namespace folly {
struct PyBufferData {
folly::Executor* executor;
......@@ -93,5 +92,4 @@ bool check_iobuf_less(const folly::IOBuf* a, const folly::IOBuf* b) {
return folly::IOBufLess{}(a, b);
}
} // namespace py3
} // namespace thrift
} // namespace folly
......@@ -45,7 +45,7 @@ cdef extern from '<utility>' namespace 'std':
unique_ptr[cIOBuf] move(unique_ptr[cIOBuf])
cdef extern from "folly/python/iobuf.h" namespace "thrift::py3":
cdef extern from "folly/python/iobuf.h" namespace "folly":
unique_ptr[cIOBuf] iobuf_from_python(cFollyExecutor*, PyObject*, void*, uint64_t)
bint check_iobuf_equal(cIOBuf*, cIOBuf*)
bint check_iobuf_less(cIOBuf*, cIOBuf*)
......
......@@ -27,7 +27,7 @@ Options.fast_fail = True
ext = Extension(
"folly.executor",
sources=["folly/executor.pyx"],
sources=["folly/executor.pyx", "folly/iobuf.pyx"],
libraries=["folly_pic", "glog", "double-conversion", "iberty"],
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment