Comments (7)
static
aren't private in that the function isn't intended to be used by the user. It just mean that the function won't be part of the ABI of the library but is otherwise fully usable by the user.
Using that, however, always require the equivalence of a C compiler, and that's not in the current scope of Clang.jl
.
from clang.jl.
HI @ihnorton ,
any news on this?
I would like to automatically wrap some headers that contain static inline
functions and I don't know where to start. Now I'm checked if isinlined()
to ignore them ... but is not what I want.
How can I deal with static inline
functions? are currently supported?
Thanks in advance!
from clang.jl.
@victorsndvg wrapping C++ libraries are not supported, please try Cxx.jl(only support Julia-v1.3- for now) instead.
from clang.jl.
@Gnimuc , in thiscase I'm dealing with a C library with inlined functions, not C++ library.
Such functions are inlined
and implemented in headers, see the example hear:
https://github.com/cburstedde/libsc/blob/7089d44934f34b60d6f63dded2cf774eebbfe1c9/src/sc_containers.h#L458
The compiled library does not contain those symbols. How can I call them or wrapp them from julia? is it possible?
from clang.jl.
In C, static
marks that function to be "private", which means the library author doesn't allow users to use it intentionally. If you'd like to walk around that, I think you could always add a wrapper C function with the same signature and recompile.
For this particular function, it looks like it just does some basic pointer arithmetics, maybe you could use Julia's unsafe_load
/unsafe_wrap
to implement the same functionality.
from clang.jl.
Ok @Gnimuc , I think I caught how to deal with it.
Thanks for your quick response. It has been very helpful!
from clang.jl.
Yeah, I understand @yuyichao .
Then I would like to know whether a declaration is static or not from Clang.jl, is this possible?
I can check if it isinlined
, but I don't see any function similar to isstatic
.
Very helpful.
Thanks in advance!
from clang.jl.
Related Issues (20)
- Not emitting definition for INT8_MAX (from stdint) HOT 2
- In get_system_shard_key() BoundsError: attempt to access 2-element Vector{String} at index [] HOT 7
- const array breaks StructMutualRef HOT 1
- Incorrect handling of TypedefFunction HOT 9
- Does Clang.jl have an option to skip `static` functions?
- Resource failed HOT 1
- Unable to install Clang.jl on Julia master for 1.11-dev - needs new libLLVM_jll
- Conflicting `enum` and `#define` identifiers make a translated header cause `invalid redefinition of constant` HOT 2
- `UndefVarError` when encountering `#define` used to rename function HOT 1
- Binding generation for MLIR fails due to C++ being present HOT 6
- get_default_args fails on 1.10 HOT 2
- Fall back to really old version when LLVM.jl not available HOT 3
- warning for `library_name` HOT 1
- Documentation references are generated for symbols which are not documented HOT 12
- Troubles parsing a C++ project with Clang.jl v0.18.0 and julia v1.11 (llvm 16) HOT 6
- Unsure how to handle JLL dependencies HOT 7
- Shards regression in 0.18 HOT 1
- Forward declaration of struct defined in dependency causes duplicate code generation HOT 5
- `auto_mutability` doesn't take structs into account HOT 7
- LLVM 17(Julia 1.12) support
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 clang.jl.