Comments (4)
It's a known limitation of SWIG's parser that it doesn't handle < or > in constant expressions. Here's a closely related existing bug which gives a bit more background:
http://sourceforge.net/p/swig/bugs/1139/
I don't know of a good general workaround I'm afraid. If you can modify the header being wrapped, then using !(a <= b) instead of (a > b) is an option as <= and >= are handled.
from swig.
That bug also hit me in Eigen headers: https://bitbucket.org/eigen/eigen/src/60f8b0f18340337e036b566bc583c77deb52f965/Eigen/src/Core/PlainObjectBase.h?at=default&fileviewer=file-view-default#PlainObjectBase.h-142
from swig.
I wondered if we could at least support <
and >
when in a subexpression inside (
... )
which looks like it would cover all the examples here, in #635 and in the older linked issue in the SF tracker. The Eigen link above doesn't work for me now so I can't easily check that. This wouldn't be a completely perfect solution, but would fix some cases.
I had a quick try and managed to avoid introducing any reduce/reduce conflicts (which is great) but handling <
introduces 2 new shift/reduce conflicts (which we ideally want to avoid). I'll mull this over and see if I can figure out how to make it work without any new conflicts, but if someone with bison expertise wants to take a look please say.
from swig.
Great tactical solution @ojwb
from swig.
Related Issues (20)
- Calling one typemaps from another typemaps HOT 1
- Director does not acquire GIL before executing Python code HOT 8
- Exception handling in director methods HOT 1
- cstring.i like macros for other languages
- Can Swig warn about non-wrapped types other than base classes? HOT 1
- Variables of array type are not initialized by `Swig_cargs` HOT 2
- Swig 4.0.2 C++ to Lua, after luaopen_module that contain some c++ classes, there are two tables on the Lua stack that can be popped harmlessly HOT 8
- windows swig python dll couldn't load issue HOT 3
- [JS] SWIG does not properly handle large integers HOT 5
- C# usage %varargs example: bug or feature? HOT 1
- [JavaScript] uint64_t as the target type for BigInt throws TypeError HOT 2
- swig 4.1.1 still generates 'import imp' code HOT 6
- Incorrect usage of va_list in php_wrap output HOT 2
- director_finalizer_runme.php is failing with PHP 8.3 HOT 1
- swig -c++ -csharp dwindows.i crashed HOT 1
- "using" keyword with operator== on parent method hides child method HOT 5
- Excecute piece of code at python object creation HOT 2
- How to use swig to wrap classes with the same name in multiple namespaces using the "using" keyword
- using declarations and typedefs
- OCaml 5.x support ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swig.