Comments (1)
No, records contain their fields "by value", meaning that a circularly-defined type would be of infinite size. If you need recursive types you need to implement them using custom interfaces, or come up with some other data format to pass them across the language boundary.
For your specific case, I think the list does indeed keep it from being infinite size at run-time, but at build time you can't define the C++ structs circularly, even with forward-declarations, since vector<T>
requires the full definition of T. A record representation which could break that dependency would have to use an extra layer of indirection via pointers or type-erasure, which isn't something intended by Djinni.
from djinni.
Related Issues (20)
- Problem running multiple processes on a android device HOT 1
- JNI headers include themselves HOT 1
- iOS vs Android performance HOT 1
- std::shared_ptr<T> and std::function<void <void* ptr , size_t size> > HOT 4
- Djinni does not wrap code into NN_CHECK_ASSERT HOT 5
- Djinni's optional<enum> generates an NSNumber on iOS HOT 3
- Bug on DSL parser HOT 1
- Djinni don't write enums correctly using ordinal value HOT 9
- iOS framework headers subfolder HOT 2
- Crash in IDEA plugin
- Set with other collections doesn't compile HOT 1
- Discussion about merging works from LedgerHQ/djinni into this repository HOT 1
- Generate bindings for nodejs HOT 1
- Problems when compile djinni HOT 2
- Add djinni distribution in binary form HOT 5
- Mapping an enum inside a struct in .djinni file HOT 4
- Write operator functions for custom struct or class generated by djinni HOT 2
- android Q(10) HOT 1
- Comments on enums and flags are not included in C++ headers
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 djinni.