I am wrapping a C ++ library in PHP using SWIG , and there have been times when I want to modify the generated code (both generated C ++ and PHP):
- Fix code generation errors
- Add code that makes sense in PHP but not in C ++ (e.g. type checking)
- Add documentation tags (e.g. phpDoc)
I am currently automating these changes with patch. This approach works, but it seems very technical and fragile. Is there a better way to do this?
source
share