Kathryn-cat commented on code in PR #230:
URL: https://github.com/apache/tvm-ffi/pull/230#discussion_r2543340731
##########
python/tvm_ffi/cpp/extension.py:
##########
@@ -366,8 +371,14 @@ def _decorate_with_tvm_ffi(source: str, functions:
Mapping[str, str]) -> str:
]
for func_name, func_doc in functions.items():
- sources.append(f"TVM_FFI_DLL_EXPORT_TYPED_FUNC({func_name},
{func_name});")
- _ = func_doc # todo: add support to embed function docstring to the
tvm ffi functions.
+ if func_doc:
+ # Escape the docstring for C++ string literal
+ escaped_doc = func_doc.replace("\\", "\\\\").replace('"',
'\\"').replace("\n", "\\n")
Review Comment:
addressed, @junrushao can double check
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]