Skip to content

Commit

Permalink
Add IOBuf support
Browse files Browse the repository at this point in the history
Summary: Currently if we have `cpp.Type{name = "folly::IOBuf"}`, the python type of the field will be changed to IOBuf. In this case we can not assign `bytes` to IOBuf field directly (otherwise there will be runtime error due to type mismatch).

Reviewed By: thedavekwon

Differential Revision: D64764837

fbshipit-source-id: 4b9e5c73a954e9bdef6d674867cbbe67c15649fe
  • Loading branch information
TJ Yin authored and facebook-github-bot committed Oct 25, 2024
1 parent a4ac153 commit 7a2b0fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ from common.thrift.patch.detail.py_bindings.DynamicPatch import (
)

import thrift.python.types as _fbthrift_python_types
import folly.iobuf as _fbthrift_iobuf

import {{program:module_path}}.thrift_types
from {{program:module_path}}.thrift_types import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
)

import thrift.python.types as _fbthrift_python_types
import folly.iobuf as _fbthrift_iobuf

import test.fixtures.basic.module.thrift_types
from test.fixtures.basic.module.thrift_types import (
Expand Down

0 comments on commit 7a2b0fa

Please sign in to comment.